diff --git a/data_model/clusters/Scenes.xml b/data_model/clusters/Scenes.xml index f82a470ca28eb5..daa9e5da564a41 100644 --- a/data_model/clusters/Scenes.xml +++ b/data_model/clusters/Scenes.xml @@ -1,61 +1,61 @@ - - + @@ -528,4 +528,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/ColorDimmerSwitch.xml b/data_model/device_types/ColorDimmerSwitch.xml index dcd2ac18b1a912..4de98619c1f9fb 100644 --- a/data_model/device_types/ColorDimmerSwitch.xml +++ b/data_model/device_types/ColorDimmerSwitch.xml @@ -1,59 +1,59 @@ - @@ -73,7 +73,7 @@ Davis, CA 95616, USA - + @@ -89,4 +89,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/ColorTemperatureLight.xml b/data_model/device_types/ColorTemperatureLight.xml index 889f63db0de1f5..2e6db00535d3e3 100644 --- a/data_model/device_types/ColorTemperatureLight.xml +++ b/data_model/device_types/ColorTemperatureLight.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -155,4 +155,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/ControlBridge.xml b/data_model/device_types/ControlBridge.xml index 6ed528c0122d96..6c73377045b533 100644 --- a/data_model/device_types/ControlBridge.xml +++ b/data_model/device_types/ControlBridge.xml @@ -1,59 +1,59 @@ - @@ -74,7 +74,7 @@ required."/> - + @@ -96,4 +96,4 @@ required."/> - \ No newline at end of file + diff --git a/data_model/device_types/DimmableLight.xml b/data_model/device_types/DimmableLight.xml index 39f193f53e7553..777cf64847884b 100644 --- a/data_model/device_types/DimmableLight.xml +++ b/data_model/device_types/DimmableLight.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -142,4 +142,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/DimmablePlug-InUnit.xml b/data_model/device_types/DimmablePlug-InUnit.xml index 012f752c7cc699..9a304fe9d18460 100644 --- a/data_model/device_types/DimmablePlug-InUnit.xml +++ b/data_model/device_types/DimmablePlug-InUnit.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -142,4 +142,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/DimmerSwitch.xml b/data_model/device_types/DimmerSwitch.xml index a3bae868a2498b..9922d6fb96dbcf 100644 --- a/data_model/device_types/DimmerSwitch.xml +++ b/data_model/device_types/DimmerSwitch.xml @@ -1,59 +1,59 @@ - @@ -73,7 +73,7 @@ Davis, CA 95616, USA - + @@ -86,4 +86,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/DoorLock.xml b/data_model/device_types/DoorLock.xml index b322f991c3b6e4..c5eaf911f8f537 100644 --- a/data_model/device_types/DoorLock.xml +++ b/data_model/device_types/DoorLock.xml @@ -1,59 +1,59 @@ - @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + @@ -187,4 +187,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/DoorLockController.xml b/data_model/device_types/DoorLockController.xml index 413509de632c6e..6e515bc206e04a 100644 --- a/data_model/device_types/DoorLockController.xml +++ b/data_model/device_types/DoorLockController.xml @@ -1,59 +1,59 @@ - @@ -78,7 +78,7 @@ Davis, CA 95616, USA - + @@ -96,4 +96,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/ExtendedColorLight.xml b/data_model/device_types/ExtendedColorLight.xml index d0ad7936d3629d..839a9c1db7a75b 100644 --- a/data_model/device_types/ExtendedColorLight.xml +++ b/data_model/device_types/ExtendedColorLight.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -167,4 +167,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/HeatingCoolingUnit.xml b/data_model/device_types/HeatingCoolingUnit.xml index 244ff14b0a15fa..3bcf0b8e2db0d1 100644 --- a/data_model/device_types/HeatingCoolingUnit.xml +++ b/data_model/device_types/HeatingCoolingUnit.xml @@ -1,59 +1,59 @@ - @@ -70,7 +70,7 @@ Davis, CA 95616, USA - + @@ -92,4 +92,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/OnOffLight.xml b/data_model/device_types/OnOffLight.xml index 1ce39e8545c84a..6b12217ff10d6f 100644 --- a/data_model/device_types/OnOffLight.xml +++ b/data_model/device_types/OnOffLight.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -142,4 +142,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/OnOffLightSwitch.xml b/data_model/device_types/OnOffLightSwitch.xml index c2c324c8ee5d2a..df64178ade52ad 100644 --- a/data_model/device_types/OnOffLightSwitch.xml +++ b/data_model/device_types/OnOffLightSwitch.xml @@ -1,59 +1,59 @@ - @@ -73,7 +73,7 @@ Davis, CA 95616, USA - + @@ -83,4 +83,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/OnOffPlug-inUnit.xml b/data_model/device_types/OnOffPlug-inUnit.xml index 11bd17151d5e49..83f1c9d0ec15ec 100644 --- a/data_model/device_types/OnOffPlug-inUnit.xml +++ b/data_model/device_types/OnOffPlug-inUnit.xml @@ -1,59 +1,59 @@ - @@ -76,7 +76,7 @@ Davis, CA 95616, USA - + @@ -142,4 +142,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/OnOffSensor.xml b/data_model/device_types/OnOffSensor.xml index d2c6553fc1140c..d28f76f6130964 100644 --- a/data_model/device_types/OnOffSensor.xml +++ b/data_model/device_types/OnOffSensor.xml @@ -1,59 +1,59 @@ - @@ -74,7 +74,7 @@ required."/> - + @@ -90,4 +90,4 @@ required."/> - \ No newline at end of file + diff --git a/data_model/device_types/Pump.xml b/data_model/device_types/Pump.xml index 6f1b1f39aae53c..298bb43cbb02c6 100644 --- a/data_model/device_types/Pump.xml +++ b/data_model/device_types/Pump.xml @@ -1,59 +1,59 @@ - @@ -70,7 +70,7 @@ Davis, CA 95616, USA - + @@ -107,4 +107,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/PumpController.xml b/data_model/device_types/PumpController.xml index 1eb302399379fe..223915f4525b40 100644 --- a/data_model/device_types/PumpController.xml +++ b/data_model/device_types/PumpController.xml @@ -1,59 +1,59 @@ - @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + @@ -100,4 +100,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/RoomAirConditioner.xml b/data_model/device_types/RoomAirConditioner.xml index 86240698da6789..8e6a833406637c 100644 --- a/data_model/device_types/RoomAirConditioner.xml +++ b/data_model/device_types/RoomAirConditioner.xml @@ -1,59 +1,59 @@ - @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + @@ -95,4 +95,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/Thermostat.xml b/data_model/device_types/Thermostat.xml index 117bf36aa8b025..dac8172278b4ad 100644 --- a/data_model/device_types/Thermostat.xml +++ b/data_model/device_types/Thermostat.xml @@ -1,59 +1,59 @@ - @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + @@ -154,4 +154,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/WindowCovering.xml b/data_model/device_types/WindowCovering.xml index aecac7e3b24052..1f9e4a3a8ec319 100644 --- a/data_model/device_types/WindowCovering.xml +++ b/data_model/device_types/WindowCovering.xml @@ -1,59 +1,59 @@ - @@ -75,7 +75,7 @@ Davis, CA 95616, USA - + @@ -121,4 +121,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/device_types/WindowCoveringController.xml b/data_model/device_types/WindowCoveringController.xml index f61f46f5132b4b..8e31eed548e90e 100644 --- a/data_model/device_types/WindowCoveringController.xml +++ b/data_model/device_types/WindowCoveringController.xml @@ -1,59 +1,59 @@ - @@ -78,7 +78,7 @@ Davis, CA 95616, USA - + @@ -98,4 +98,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/docs/clusters.md b/docs/clusters.md index 1d0453033db586..70f657fd8779ad 100644 --- a/docs/clusters.md +++ b/docs/clusters.md @@ -14,7 +14,6 @@ Generally regenerate using one of: | ---------- | ---------- | ------------------------------------------------------- | | 3 | 0x03 | Identify | | 4 | 0x04 | Groups | -| 5 | 0x05 | Scenes | | 6 | 0x06 | OnOff | | 7 | 0x07 | OnOffSwitchConfiguration | | 8 | 0x08 | LevelControl | @@ -73,6 +72,7 @@ Generally regenerate using one of: | 95 | 0x5F | MicrowaveOvenControl | | 96 | 0x60 | OperationalState | | 97 | 0x61 | RvcOperationalState | +| 98 | 0x62 | ScenesManagement | | 113 | 0x71 | HepaFilterMonitoring | | 114 | 0x72 | ActivatedCarbonFilterMonitoring | | 128 | 0x80 | BooleanStateConfiguration | diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index 7edbede54057ae..c940f2c92575e7 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -539,7 +539,7 @@ OnOff OperationalCredentials PumpConfigurationAndControl RelativeHumidityMeasurement -Scenes +ScenesManagement SoftwareDiagnostics Switch Channel diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index bf17de9820366e..99eb91c4e43fba 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -3615,6 +3422,199 @@ cluster RvcOperationalState = 97 { command Resume(): OperationalCommandResponse = 3; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for monitoring HEPA filters in a device */ cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set @@ -7213,39 +7213,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - handle command EnhancedAddScene; - handle command EnhancedAddSceneResponse; - handle command EnhancedViewScene; - handle command EnhancedViewSceneResponse; - handle command CopyScene; - handle command CopySceneResponse; - } - server cluster OnOff { persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -7639,6 +7606,39 @@ endpoint 1 { handle command OperationalCommandResponse; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + handle command EnhancedAddScene; + handle command EnhancedAddSceneResponse; + handle command EnhancedViewScene; + handle command EnhancedViewSceneResponse; + handle command CopyScene; + handle command CopySceneResponse; + } + server cluster HepaFilterMonitoring { callback attribute condition; callback attribute degradationDirection; @@ -8455,39 +8455,6 @@ endpoint 2 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - handle command EnhancedAddScene; - handle command EnhancedAddSceneResponse; - handle command EnhancedViewScene; - handle command EnhancedViewSceneResponse; - handle command CopyScene; - handle command CopySceneResponse; - } - server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 1; @@ -8539,6 +8506,39 @@ endpoint 2 { ram attribute clusterRevision default = 2; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + handle command EnhancedAddScene; + handle command EnhancedAddSceneResponse; + handle command EnhancedViewScene; + handle command EnhancedViewSceneResponse; + handle command CopyScene; + handle command CopySceneResponse; + } + server cluster OccupancySensing { ram attribute occupancy; ram attribute occupancySensorType; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 589fccf290f084..5948b880a8d5c1 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -6464,8 +6464,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -22086,8 +22086,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index d97c29e2da342b..831048dc7d014f 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2589,6 +2396,199 @@ cluster TemperatureControl = 86 { command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface to a generic way to secure a door */ cluster DoorLock = 257 { revision 7; @@ -6278,33 +6278,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster OnOff { persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -6435,6 +6408,33 @@ endpoint 1 { handle command SetTemperature; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster DoorLock { emits event DoorLockAlarm; emits event LockOperation; @@ -6838,32 +6838,6 @@ endpoint 2 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 1; @@ -6911,6 +6885,32 @@ endpoint 2 { ram attribute clusterRevision default = 2; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster OccupancySensing { ram attribute occupancy; ram attribute occupancySensorType; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 2ca83ff224c938..395e0c9f302e71 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -4551,8 +4551,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -10787,8 +10787,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index c53936a568b663..7987c79179e375 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -2276,8 +2276,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 19c9f5231f5e22..6aed1fec4b48ad 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -178,199 +178,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2199,6 +2006,199 @@ cluster IcdManagement = 70 { command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2904,8 +2904,8 @@ endpoint 1 { device type ma_onofflightswitch = 259, version 1; binding cluster Identify; - binding cluster Scenes; binding cluster OnOff; + binding cluster ScenesManagement; binding cluster ColorControl; server cluster Identify { diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 354ba583cf0b41..e652272b3b3664 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -4881,8 +4881,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "client", diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 1dbdd0a6b54450..6d92c5e339275f 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2017,6 +1824,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2755,35 +2755,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - handle command EnhancedAddScene; - handle command EnhancedViewScene; - handle command CopyScene; - } - server cluster OnOff { persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -2838,6 +2809,35 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + handle command EnhancedAddScene; + handle command EnhancedViewScene; + handle command CopyScene; + } + server cluster ColorControl { persist attribute currentHue default = 0x00; persist attribute currentSaturation default = 0x00; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 854b16014cd6bf..2c4aaf0c4013ba 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4426,8 +4426,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 882aed6c1ddc3a..fb3253218f4a1a 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2102,6 +1909,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2755,39 +2755,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - handle command EnhancedAddScene; - handle command EnhancedAddSceneResponse; - handle command EnhancedViewScene; - handle command EnhancedViewSceneResponse; - handle command CopyScene; - handle command CopySceneResponse; - } - server cluster OnOff { persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -2874,6 +2841,39 @@ endpoint 1 { ram attribute clusterRevision default = 2; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + handle command EnhancedAddScene; + handle command EnhancedAddSceneResponse; + handle command EnhancedViewScene; + handle command EnhancedViewSceneResponse; + handle command CopyScene; + handle command CopySceneResponse; + } + server cluster ColorControl { persist attribute currentHue default = 0x00; persist attribute currentSaturation default = 0x00; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index eb00551c566457..ec0f241672b992 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -3974,8 +3974,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 6914dd4e3e37f2..3a2db86eaf0bb6 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2013,6 +1820,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -2614,36 +2614,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - handle command EnhancedAddScene; - handle command EnhancedViewScene; - handle command CopyScene; - } - server cluster OnOff { persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -2730,6 +2700,36 @@ endpoint 1 { ram attribute clusterRevision default = 2; } + server cluster ScenesManagement { + ram attribute nameSupport default = 0x80; + ram attribute lastConfiguredBy; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + handle command EnhancedAddScene; + handle command EnhancedViewScene; + handle command CopyScene; + } + server cluster ColorControl { persist attribute currentHue default = 0x00; persist attribute currentSaturation default = 0x00; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index c5f5ddec752665..02ff0033007921 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -3142,8 +3142,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index f3c47883ad1b06..3a1cbd1c932376 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -178,199 +178,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -3183,6 +2990,199 @@ cluster ModeSelect = 80 { command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface to a generic way to secure a door */ cluster DoorLock = 257 { revision 7; @@ -9048,31 +9048,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -9185,6 +9160,31 @@ endpoint 1 { callback attribute clusterRevision default = 1; } + server cluster ScenesManagement { + ram attribute nameSupport; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster ColorControl { ram attribute currentHue default = 0x00; ram attribute currentSaturation default = 0x00; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index b7e4e02d1370cd..d43349f6f36e03 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -11795,8 +11795,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 55d45919983da8..05feee108add0a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -178,199 +178,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -3140,6 +2947,199 @@ cluster ModeSelect = 80 { command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface to a generic way to secure a door */ cluster DoorLock = 257 { revision 7; @@ -9010,31 +9010,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; @@ -9126,6 +9101,31 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster ScenesManagement { + ram attribute nameSupport; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster ColorControl { ram attribute currentHue default = 0x00; ram attribute currentSaturation default = 0x00; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index c821c18390ea66..dbb7121ff8b06f 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -11877,8 +11877,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 7ac33292457064..1b0c9ec3bb7ffa 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -178,199 +178,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1918,6 +1725,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { revision 6; @@ -2602,28 +2602,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport; - ram attribute sceneTableSize; - callback attribute fabricSceneInfo; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 4; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -2673,6 +2651,28 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster ScenesManagement { + ram attribute nameSupport; + ram attribute sceneTableSize; + callback attribute fabricSceneInfo; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 4; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster Thermostat { ram attribute localTemperature; ram attribute absMinHeatSetpointLimit default = 700; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 52062d89c75a08..22977f4ee367e8 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -3770,8 +3770,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index a3b80ba9c59146..b89f05061ce2bf 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -178,199 +178,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1829,6 +1636,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { revision 6; @@ -2458,28 +2458,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport; - ram attribute sceneTableSize; - callback attribute fabricSceneInfo; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 4; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -2529,6 +2507,28 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster ScenesManagement { + ram attribute nameSupport; + ram attribute sceneTableSize; + callback attribute fabricSceneInfo; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 4; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster Thermostat { ram attribute localTemperature; ram attribute absMinHeatSetpointLimit default = 700; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 035d087d09cab1..6c4c7748134b77 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -2912,8 +2912,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Clusters.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Clusters.java index 5322af22c97ae5..d699ca68ea6365 100644 --- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Clusters.java +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Clusters.java @@ -22,7 +22,7 @@ public class Clusters { public static final long ClusterId_DeviceTemperatureConfiguration = 0x00000002; public static final long ClusterId_Identify = 0x00000003; public static final long ClusterId_Groups = 0x00000004; - public static final long ClusterId_Scenes = 0x00000005; + public static final long ClusterId_ScenesManagement = 0x00000062; public static final long ClusterId_OnOff = 0x00000006; public static final long ClusterId_OnOffSwitchConfiguration = 0x00000007; public static final long ClusterId_LevelControl = 0x00000008; diff --git a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java index 47e1dd0f5192a4..a124773e69b81f 100644 --- a/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java +++ b/examples/virtual-device-app/android/java/src/com/matter/virtual/device/app/Clusters.java @@ -22,7 +22,7 @@ public class Clusters { public static final long ClusterId_DeviceTemperatureConfiguration = 0x00000002; public static final long ClusterId_Identify = 0x00000003; public static final long ClusterId_Groups = 0x00000004; - public static final long ClusterId_Scenes = 0x00000005; + public static final long ClusterId_ScenesManagement = 0x00000062; public static final long ClusterId_OnOff = 0x00000006; public static final long ClusterId_OnOffSwitchConfiguration = 0x00000007; public static final long ClusterId_LevelControl = 0x00000008; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index f2b4890912d2b7..d1379a9277b759 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -2065,6 +1872,199 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** An interface to a generic way to secure a door */ cluster DoorLock = 257 { revision 7; @@ -3411,32 +3411,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster Scenes { - ram attribute nameSupport; - ram attribute sceneTableSize default = 16; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 5; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster OnOff { ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 1; @@ -3480,6 +3454,32 @@ endpoint 1 { ram attribute clusterRevision default = 2; } + server cluster ScenesManagement { + ram attribute nameSupport; + ram attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 5; + + handle command AddScene; + handle command AddSceneResponse; + handle command ViewScene; + handle command ViewSceneResponse; + handle command RemoveScene; + handle command RemoveSceneResponse; + handle command RemoveAllScenes; + handle command RemoveAllScenesResponse; + handle command StoreScene; + handle command StoreSceneResponse; + handle command RecallScene; + handle command GetSceneMembership; + handle command GetSceneMembershipResponse; + } + server cluster DoorLock { emits event DoorLockAlarm; emits event LockOperation; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index c386e4c4becfe7..05b90acdc3dee7 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -4374,8 +4374,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter index 6c1204d2f42b13..62dd40060436de 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter @@ -102,7 +102,7 @@ server cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -server cluster Scenes = 5 { +server cluster MatterScenes = 98 { bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } @@ -4221,7 +4221,7 @@ endpoint 1 { ram attribute clusterRevision default = 4; } - server cluster Scenes { + server cluster MatterScenes { ram attribute sceneCount; ram attribute currentScene; ram attribute currentGroup; diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h index 713ef6ef5ab70e..67bd61c9519d3c 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h @@ -33,6 +33,7 @@ void MatterKeypadInputPluginServerInitCallback(); void MatterLevelControlPluginServerInitCallback(); void MatterLocalizationConfigurationPluginServerInitCallback(); void MatterLowPowerPluginServerInitCallback(); +void MatterMatterScenesPluginServerInitCallback(); void MatterMediaInputPluginServerInitCallback(); void MatterMediaPlaybackPluginServerInitCallback(); void MatterModeSelectPluginServerInitCallback(); @@ -47,7 +48,6 @@ void MatterPowerSourceConfigurationPluginServerInitCallback(); void MatterPressureMeasurementPluginServerInitCallback(); void MatterPumpConfigurationAndControlPluginServerInitCallback(); void MatterRelativeHumidityMeasurementPluginServerInitCallback(); -void MatterScenesPluginServerInitCallback(); void MatterSoftwareDiagnosticsPluginServerInitCallback(); void MatterSwitchPluginServerInitCallback(); void MatterTargetNavigatorPluginServerInitCallback(); @@ -98,6 +98,7 @@ void MatterWindowCoveringPluginServerInitCallback(); MatterLevelControlPluginServerInitCallback(); \ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterLowPowerPluginServerInitCallback(); \ + MatterMatterScenesPluginServerInitCallback(); \ MatterMediaInputPluginServerInitCallback(); \ MatterMediaPlaybackPluginServerInitCallback(); \ MatterModeSelectPluginServerInitCallback(); \ @@ -112,7 +113,6 @@ void MatterWindowCoveringPluginServerInitCallback(); MatterPressureMeasurementPluginServerInitCallback(); \ MatterPumpConfigurationAndControlPluginServerInitCallback(); \ MatterRelativeHumidityMeasurementPluginServerInitCallback(); \ - MatterScenesPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterSwitchPluginServerInitCallback(); \ MatterTargetNavigatorPluginServerInitCallback(); \ diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp index f5a6cb85d0b253..6b8e07b967cabe 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp @@ -112,6 +112,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::LowPower::Id: emberAfLowPowerClusterInitCallback(endpoint); break; + case app::Clusters::MatterScenes::Id: + emberAfMatterScenesClusterInitCallback(endpoint); + break; case app::Clusters::MediaInput::Id: emberAfMediaInputClusterInitCallback(endpoint); break; @@ -154,9 +157,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::RelativeHumidityMeasurement::Id: emberAfRelativeHumidityMeasurementClusterInitCallback(endpoint); break; - case app::Clusters::Scenes::Id: - emberAfScenesClusterInitCallback(endpoint); - break; case app::Clusters::SoftwareDiagnostics::Id: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; @@ -374,6 +374,11 @@ void __attribute__((weak)) emberAfLowPowerClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfMatterScenesClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfMediaInputClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -444,11 +449,6 @@ void __attribute__((weak)) emberAfRelativeHumidityMeasurementClusterInitCallback // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 65cf99d5b0f510..5629d05810c8a6 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -5973,8 +5973,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -15220,8 +15220,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -16799,4 +16799,4 @@ } ], "log": [] -} \ No newline at end of file +} diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index 837dc58d560ca0..82dab06aeeae0f 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -393,10 +393,6 @@ 0x00000004, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ 0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ 0x00000004, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ - 0x00000005, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ - 0x00000005, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ - 0x00000005, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ - 0x00000005, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ 0x00000030, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 0x00000030, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 0x00000030, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ @@ -425,6 +421,10 @@ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ 0x0000003F, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000062, /* Cluster: Scenes Management, Command: AddScene, Privilege: manage */ \ + 0x00000062, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ + 0x00000062, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ + 0x00000062, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ 0x00000101, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ 0x00000101, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ @@ -449,10 +449,6 @@ 0x00000003, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ 0x00000004, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ 0x00000005, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ - 0x00000000, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ - 0x00000002, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ - 0x00000003, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ - 0x00000004, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ 0x00000000, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ 0x00000002, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ 0x00000004, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ @@ -481,6 +477,10 @@ 0x00000001, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ 0x00000003, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ 0x00000004, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0x00000000, /* Cluster: Scenes Management, Command: AddScene, Privilege: manage */ \ + 0x00000002, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ + 0x00000003, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ + 0x00000004, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ 0x0000000B, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ 0x0000000C, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ 0x0000000D, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ @@ -505,10 +505,6 @@ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ - kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ - kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ - kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ - kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ @@ -537,6 +533,10 @@ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes Management, Command: AddScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes Management, Command: RemoveScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes Management, Command: RemoveAllScenes, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes Management, Command: StoreScene, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearWeekDaySchedule, Privilege: administer */ \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index c761ccbbcedbca..94dc18ba0e9bd0 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -749,17 +749,6 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Scenes (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SceneCount */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* CurrentScene */ \ - { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ - { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ - { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000000, 1, ZAP_TYPE(BOOLEAN), ZAP_ATTRIBUTE_MASK(TOKENIZE) }, /* OnOff */ \ { ZAP_SIMPLE_DEFAULT(0x01), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ @@ -882,6 +871,17 @@ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ + /* Endpoint: 1, Cluster: Scenes Management (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SceneCount */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* CurrentScene */ \ + { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ + { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ + { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ { ZAP_SIMPLE_DEFAULT(2), 0x00000000, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LockState */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* LockType */ \ @@ -1416,17 +1416,6 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 2, Cluster: Scenes (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SceneCount */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* CurrentScene */ \ - { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ - { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ - { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 2, Cluster: On/Off (server) */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* OnOff */ \ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ @@ -1456,6 +1445,17 @@ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ + /* Endpoint: 2, Cluster: Scenes Management (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SceneCount */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* CurrentScene */ \ + { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000002, 2, ZAP_TYPE(GROUP_ID), 0 }, /* CurrentGroup */ \ + { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ + { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ + { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* Occupancy */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* OccupancySensorType */ \ @@ -1555,10 +1555,6 @@ (EmberAfGenericClusterFunction) emberAfTimeFormatLocalizationClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterTimeFormatLocalizationClusterServerPreAttributeChangedCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayScenesServer[] = { \ - (EmberAfGenericClusterFunction) emberAfScenesClusterServerInitCallback, \ - (EmberAfGenericClusterFunction) MatterScenesClusterServerShutdownCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterOnOffClusterServerShutdownCallback, \ @@ -1571,6 +1567,10 @@ (EmberAfGenericClusterFunction) emberAfModeSelectClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterModeSelectClusterServerPreAttributeChangedCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayScenesManagementServer[] = { \ + (EmberAfGenericClusterFunction) emberAfScenesManagementClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterScenesManagementClusterServerShutdownCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayDoorLockServer[] = { \ (EmberAfGenericClusterFunction) MatterDoorLockClusterServerAttributeChangedCallback, \ (EmberAfGenericClusterFunction) MatterDoorLockClusterServerShutdownCallback, \ @@ -1743,26 +1743,8 @@ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=94) */ \ - 0x00000000 /* AddScene */, \ - 0x00000001 /* ViewScene */, \ - 0x00000002 /* RemoveScene */, \ - 0x00000003 /* RemoveAllScenes */, \ - 0x00000004 /* StoreScene */, \ - 0x00000005 /* RecallScene */, \ - 0x00000006 /* GetSceneMembership */, \ - chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=102)*/ \ - 0x00000000 /* AddSceneResponse */, \ - 0x00000001 /* ViewSceneResponse */, \ - 0x00000002 /* RemoveSceneResponse */, \ - 0x00000003 /* RemoveAllScenesResponse */, \ - 0x00000004 /* StoreSceneResponse */, \ - 0x00000006 /* GetSceneMembershipResponse */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=109) */ \ + /* AcceptedCommandList (index=94) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1771,7 +1753,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=116) */ \ + /* AcceptedCommandList (index=101) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1782,9 +1764,27 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=125) */ \ + /* AcceptedCommandList (index=110) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 1, Cluster: Scenes Management (server) */\ + /* AcceptedCommandList (index=112) */ \ + 0x00000000 /* AddScene */, \ + 0x00000001 /* ViewScene */, \ + 0x00000002 /* RemoveScene */, \ + 0x00000003 /* RemoveAllScenes */, \ + 0x00000004 /* StoreScene */, \ + 0x00000005 /* RecallScene */, \ + 0x00000006 /* GetSceneMembership */, \ + chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=120)*/ \ + 0x00000000 /* AddSceneResponse */, \ + 0x00000001 /* ViewSceneResponse */, \ + 0x00000002 /* RemoveSceneResponse */, \ + 0x00000003 /* RemoveAllScenesResponse */, \ + 0x00000004 /* StoreSceneResponse */, \ + 0x00000006 /* GetSceneMembershipResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ /* AcceptedCommandList (index=127) */ \ 0x00000000 /* LockDoor */, \ @@ -1927,8 +1927,17 @@ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 2, Cluster: Scenes (server) */\ + /* Endpoint: 2, Cluster: On/Off (server) */\ /* AcceptedCommandList (index=240) */ \ + 0x00000000 /* Off */, \ + 0x00000001 /* On */, \ + 0x00000002 /* Toggle */, \ + 0x00000040 /* OffWithEffect */, \ + 0x00000041 /* OnWithRecallGlobalScene */, \ + 0x00000042 /* OnWithTimedOff */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: Scenes Management (server) */\ + /* AcceptedCommandList (index=247) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1937,7 +1946,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=248)*/ \ + /* GeneratedCommandList (index=255)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1945,15 +1954,6 @@ 0x00000004 /* StoreSceneResponse */, \ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=255) */ \ - 0x00000000 /* Off */, \ - 0x00000001 /* On */, \ - 0x00000002 /* Toggle */, \ - 0x00000040 /* OffWithEffect */, \ - 0x00000041 /* OnWithRecallGlobalScene */, \ - 0x00000042 /* OnWithTimedOff */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ /* AcceptedCommandList (index=262) */ \ 0x00000000 /* ScanNetworks */, \ @@ -2353,28 +2353,15 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 1, Cluster: Scenes (server) */ \ - .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(238), \ - .attributeCount = 9, \ - .clusterSize = 13, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ - .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ), \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(247), \ + .attributes = ZAP_ATTRIBUTE_INDEX(238), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2382,7 +2369,7 @@ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(254), \ + .attributes = ZAP_ATTRIBUTE_INDEX(245), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2395,12 +2382,12 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(258), \ + .attributes = ZAP_ATTRIBUTE_INDEX(249), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2408,7 +2395,7 @@ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(274), \ + .attributes = ZAP_ATTRIBUTE_INDEX(265), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2421,7 +2408,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(279), \ + .attributes = ZAP_ATTRIBUTE_INDEX(270), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2434,7 +2421,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(285), \ + .attributes = ZAP_ATTRIBUTE_INDEX(276), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2447,7 +2434,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(288), \ + .attributes = ZAP_ATTRIBUTE_INDEX(279), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2460,7 +2447,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(293), \ + .attributes = ZAP_ATTRIBUTE_INDEX(284), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2473,7 +2460,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(302), \ + .attributes = ZAP_ATTRIBUTE_INDEX(293), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2486,7 +2473,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(307), \ + .attributes = ZAP_ATTRIBUTE_INDEX(298), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2499,7 +2486,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(310), \ + .attributes = ZAP_ATTRIBUTE_INDEX(301), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2512,7 +2499,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(313), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2525,16 +2512,29 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(316), \ + .attributes = ZAP_ATTRIBUTE_INDEX(307), \ .attributeCount = 9, \ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 110 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ },\ + { \ + /* Endpoint: 1, Cluster: Scenes Management (server) */ \ + .clusterId = 0x00000062, \ + .attributes = ZAP_ATTRIBUTE_INDEX(316), \ + .attributeCount = 9, \ + .clusterSize = 13, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ + .functions = chipFuncArrayScenesManagementServer, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 112 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ { \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ @@ -2925,28 +2925,15 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 2, Cluster: Scenes (server) */ \ - .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(687), \ - .attributeCount = 9, \ - .clusterSize = 13, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ - .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ), \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(696), \ + .attributes = ZAP_ATTRIBUTE_INDEX(687), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 255 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2954,7 +2941,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(703), \ + .attributes = ZAP_ATTRIBUTE_INDEX(694), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2967,7 +2954,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(709), \ + .attributes = ZAP_ATTRIBUTE_INDEX(700), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2977,6 +2964,19 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ + { \ + /* Endpoint: 2, Cluster: Scenes Management (server) */ \ + .clusterId = 0x00000062, \ + .attributes = ZAP_ATTRIBUTE_INDEX(709), \ + .attributeCount = 9, \ + .clusterSize = 13, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ + .functions = chipFuncArrayScenesManagementServer, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 247 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 255 ), \ + .eventList = nullptr, \ + .eventCount = 0, \ + },\ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h index 11f7d888fcbbd8..cf6cdfb7388980 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h @@ -23,7 +23,6 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -55,6 +54,7 @@ #define EMBER_AF_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_BOOLEAN_STATE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BARRIER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -97,22 +97,6 @@ #define EMBER_AF_PLUGIN_GROUPS_SERVER #define EMBER_AF_PLUGIN_GROUPS -// Use this macro to check if the server side of the Scenes cluster is included -#define ZCL_USING_SCENES_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_SCENES_SERVER -#define EMBER_AF_PLUGIN_SCENES -// User options for server plugin Scenes -// Cluster spec 1.4.8.7 -#define MATTER_SCENES_TABLE_SIZE 16 -// Scenes FeatureMap Attribute Toggle Scenes Name feature -// App cluster specs 1.4.4 -#define MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK 0x0001 -#define MATTER_CLUSTER_SCENE_NAME_SUPPORT (0x000F & MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK) -// Scenes FeatureMap Table Size feature used for the MATTER_SCENES_TABLE_SIZE define -// App cluster specs 1.4.4.2 -#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK 0x0001 -#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT (0x000F & MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK) - // Use this macro to check if the server side of the On/Off cluster is included #define ZCL_USING_ON_OFF_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ON_OFF_SERVER @@ -271,6 +255,22 @@ #define EMBER_AF_PLUGIN_MODE_SELECT_SERVER #define EMBER_AF_PLUGIN_MODE_SELECT +// Use this macro to check if the server side of the Scenes Management cluster is included +#define ZCL_USING_SCENES_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_SCENES_MANAGEMENT_SERVER +#define EMBER_AF_PLUGIN_SCENES_MANAGEMENT +// User options for server plugin Scenes Management +// Cluster spec 1.4.8.7 +#define SCENES_MANAGEMENT_TABLE_SIZE 16 +// Scenes FeatureMap Attribute Toggle Scenes Name feature +// App cluster specs 1.4.4 +#define MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK 0x0001 +#define MATTER_CLUSTER_SCENE_NAME_SUPPORT (0x000F & MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK) +// Scenes FeatureMap Table Size feature used for the SCENES_MANAGEMENT_TABLE_SIZE define +// App cluster specs 1.4.4.2 +#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK 0x0001 +#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT (0x000F & MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK) + // Use this macro to check if the server side of the Door Lock cluster is included #define ZCL_USING_DOOR_LOCK_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DOOR_LOCK_SERVER diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 3dbba76be8491a..cb0d7e5be78605 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -25,7 +25,7 @@ #include #include -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include #endif @@ -59,7 +59,7 @@ constexpr uint8_t kExecuteIfOff = 1; } // namespace app } // namespace chip -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl { public: @@ -99,7 +99,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl /// @return CHIP_NO_ERROR if successfully serialized the data, CHIP_ERROR_INVALID_ARGUMENT otherwise CHIP_ERROR SerializeSave(EndpointId endpoint, ClusterId cluster, MutableByteSpan & serializedBytes) override { - using AttributeValuePair = Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePair = ScenesManagement::Structs::AttributeValuePair::Type; AttributeValuePair pairs[kColorControlScenableAttributesCount]; @@ -194,7 +194,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl CHIP_ERROR ApplyScene(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, scenes::TransitionTimeMs timeMs) override { - app::DataModel::DecodableList attributeValueList; + app::DataModel::DecodableList attributeValueList; ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); @@ -371,7 +371,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } } - void AddAttributeValuePair(Scenes::Structs::AttributeValuePair::Type * pairs, AttributeId id, uint32_t value, + void AddAttributeValuePair(ScenesManagement::Structs::AttributeValuePair::Type * pairs, AttributeId id, uint32_t value, size_t & attributeCount) { pairs[attributeCount].attributeID = id; @@ -380,7 +380,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } }; static DefaultColorControlSceneHandler sColorControlSceneHandler; -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS /********************************************************** * Matter timer scheduling glue logic @@ -434,11 +434,11 @@ ColorControlServer & ColorControlServer::Instance() chip::scenes::SceneHandler * ColorControlServer::GetSceneHandler() { -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sColorControlSceneHandler; #else return nullptr; -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } bool ColorControlServer::HasFeature(chip::EndpointId endpoint, Feature feature) @@ -1607,9 +1607,9 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com return true; } Status status = moveToHueAndSaturation(hue, saturation, transitionTime, isEnhanced, commandPath.mEndpointId); -#ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); -#endif // EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT commandObj->AddStatus(commandPath, status); return true; } @@ -1812,9 +1812,9 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb return true; } Status status = moveToSaturation(commandData.saturation, commandData.transitionTime, commandPath.mEndpointId); -#ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); -#endif // EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT commandObj->AddStatus(commandPath, status); return true; } @@ -1996,9 +1996,9 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons } exit: -#ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); -#endif // EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT commandObj->AddStatus(commandPath, status); return true; } @@ -2205,9 +2205,9 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co } Status status = moveToColor(commandData.colorX, commandData.colorY, commandData.transitionTime, commandPath.mEndpointId); -#ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); -#endif // EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT commandObj->AddStatus(commandPath, status); return true; } @@ -2732,9 +2732,9 @@ bool ColorControlServer::moveToColorTempCommand(app::CommandHandler * commandObj } Status status = moveToColorTemp(commandPath.mEndpointId, commandData.colorTemperatureMireds, commandData.transitionTime); -#ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); -#endif // EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT commandObj->AddStatus(commandPath, status); return true; } @@ -3084,11 +3084,11 @@ void emberAfColorControlClusterServerInitCallback(EndpointId endpoint) #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP ColorControlServer::Instance().startUpColorTempCommand(endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the color control cluster on the server - app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, - ColorControlServer::Instance().GetSceneHandler()); -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + app::Clusters::ScenesManagement::ScenesServer::Instance().RegisterSceneHandler( + endpoint, ColorControlServer::Instance().GetSceneHandler()); +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } void MatterColorControlClusterServerShutdownCallback(EndpointId endpoint) diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 10aa34351230b7..4ab5fa24ee577e 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -29,9 +29,9 @@ #include #include -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT using namespace chip; using namespace app::Clusters; @@ -287,9 +287,9 @@ bool emberAfGroupsClusterRemoveGroupCallback(app::CommandHandler * commandObj, c auto fabricIndex = commandObj->GetAccessingFabricIndex(); Groups::Commands::RemoveGroupResponse::Type response; -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT // If a group is removed the scenes associated with that group SHOULD be removed. - Scenes::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, commandPath.mEndpointId, commandData.groupID); + ScenesManagement::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, commandPath.mEndpointId, commandData.groupID); #endif response.groupID = commandData.groupID; response.status = GroupRemove(fabricIndex, commandPath.mEndpointId, commandData.groupID); @@ -307,7 +307,7 @@ bool emberAfGroupsClusterRemoveAllGroupsCallback(app::CommandHandler * commandOb VerifyOrExit(nullptr != provider, status = Status::Failure); -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT { GroupDataProvider::EndpointIterator * iter = provider->IterateEndpoints(fabricIndex); GroupDataProvider::GroupEndpoint mapping; @@ -317,11 +317,12 @@ bool emberAfGroupsClusterRemoveAllGroupsCallback(app::CommandHandler * commandOb { if (commandPath.mEndpointId == mapping.endpoint_id) { - Scenes::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, mapping.endpoint_id, mapping.group_id); + ScenesManagement::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, mapping.endpoint_id, mapping.group_id); } } iter->Release(); - Scenes::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, commandPath.mEndpointId, ZCL_SCENES_GLOBAL_SCENE_GROUP_ID); + ScenesManagement::ScenesServer::Instance().GroupWillBeRemoved(fabricIndex, commandPath.mEndpointId, + ZCL_SCENES_GLOBAL_SCENE_GROUP_ID); } #endif diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index ad394d1fc248b3..ba22be03055886 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -34,9 +34,9 @@ #include #include -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT #ifdef EMBER_AF_PLUGIN_ON_OFF #include @@ -120,7 +120,7 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, chip::Optional> optionsMask, chip::Optional> optionsOverride); -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl { public: @@ -158,7 +158,7 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl /// @return CHIP_NO_ERROR if successfully serialized the data, CHIP_ERROR_INVALID_ARGUMENT otherwise CHIP_ERROR SerializeSave(EndpointId endpoint, ClusterId cluster, MutableByteSpan & serializedBytes) override { - using AttributeValuePair = Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePair = ScenesManagement::Structs::AttributeValuePair::Type; app::DataModel::Nullable level; VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::CurrentLevel::Get(endpoint, level), CHIP_ERROR_READ_FAILED); @@ -202,7 +202,7 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl CHIP_ERROR ApplyScene(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, scenes::TransitionTimeMs timeMs) override { - app::DataModel::DecodableList attributeValueList; + app::DataModel::DecodableList attributeValueList; ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); @@ -254,7 +254,7 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl }; static DefaultLevelControlSceneHandler sLevelControlSceneHandler; -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS #if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); @@ -608,11 +608,11 @@ Status MoveToLevel(EndpointId endpointId, const Commands::MoveToLevel::Decodable chip::scenes::SceneHandler * GetSceneHandler() { -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sLevelControlSceneHandler; #else return nullptr; -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } } // namespace LevelControlServer @@ -904,13 +904,13 @@ static Status moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8 state->callbackSchedule.runTime = System::Clock::Milliseconds32(0); -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT // The level has changed, the scene is no longer valid. - if (emberAfContainsServer(endpoint, Scenes::Id)) + if (emberAfContainsServer(endpoint, ScenesManagement::Id)) { - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); } -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT // The setup was successful, so mark the new state as active and return. scheduleTimerCallbackMs(endpoint, computeCallbackWaitTimeMs(state->callbackSchedule, state->eventDurationMs)); @@ -1444,10 +1444,10 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } } -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the level control cluster on the server - app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, LevelControlServer::GetSceneHandler()); -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + app::Clusters::ScenesManagement::ScenesServer::Instance().RegisterSceneHandler(endpoint, LevelControlServer::GetSceneHandler()); +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 0350c61c5b07d2..eb867fb4ef893c 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -25,9 +25,9 @@ #include #include -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT #ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL #include @@ -103,7 +103,7 @@ static bool LevelControlWithOnOffFeaturePresent(EndpointId endpoint) static constexpr size_t kOnOffMaxEnpointCount = EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS static void sceneOnOffCallback(EndpointId endpoint); using OnOffEndPointPair = scenes::DefaultSceneHandlerImpl::EndpointStatePair; using OnOffTransitionTimeInterface = @@ -147,7 +147,7 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl /// @return CHIP_NO_ERROR if successfully serialized the data, CHIP_ERROR_INVALID_ARGUMENT otherwise CHIP_ERROR SerializeSave(EndpointId endpoint, ClusterId cluster, MutableByteSpan & serializedBytes) override { - using AttributeValuePair = Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePair = ScenesManagement::Structs::AttributeValuePair::Type; bool currentValue; // read current on/off value @@ -177,7 +177,7 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl CHIP_ERROR ApplyScene(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, scenes::TransitionTimeMs timeMs) override { - app::DataModel::DecodableList attributeValueList; + app::DataModel::DecodableList attributeValueList; VerifyOrReturnError(cluster == OnOff::Id, CHIP_ERROR_INVALID_ARGUMENT); @@ -210,7 +210,7 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl // versa. #ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL if (!(LevelControlWithOnOffFeaturePresent(endpoint) && - Scenes::ScenesServer::Instance().IsHandlerRegistered(endpoint, LevelControlServer::GetSceneHandler()))) + ScenesManagement::ScenesServer::Instance().IsHandlerRegistered(endpoint, LevelControlServer::GetSceneHandler()))) #endif { OnOffServer::Instance().scheduleTimerCallbackMs(mTransitionTimeInterface.sceneEventControl(endpoint), timeMs); @@ -232,7 +232,7 @@ static void sceneOnOffCallback(EndpointId endpoint) OnOffServer::Instance().setOnOffValue(endpoint, command, false); ReturnOnFailure(sOnOffSceneHandler.mSceneEndpointStatePairs.RemovePair(endpoint)); } -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS /********************************************************** * Attributes Definition @@ -300,11 +300,11 @@ OnOffServer & OnOffServer::Instance() chip::scenes::SceneHandler * OnOffServer::GetSceneHandler() { -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sOnOffSceneHandler; #else return nullptr; -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } bool OnOffServer::HasFeature(chip::EndpointId endpoint, Feature feature) @@ -455,13 +455,13 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman } } -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT // the scene has been changed (the value of on/off has changed) so // the current scene as described in the attribute table is invalid, // so mark it as invalid (just writes the valid/invalid attribute) - Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); -#endif // EMBER_AF_PLUGIN_SCENES + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT // The returned status is based solely on the On/Off cluster. Errors in the // Level Control and/or Scenes cluster are ignored. @@ -499,10 +499,11 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) status = setOnOffValue(endpoint, onOffValueForStartUp, true); } -#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#if defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the On/Off cluster on the server - app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, OnOffServer::Instance().GetSceneHandler()); -#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + app::Clusters::ScenesManagement::ScenesServer::Instance().RegisterSceneHandler(endpoint, + OnOffServer::Instance().GetSceneHandler()); +#endif // defined(EMBER_AF_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS #ifdef EMBER_AF_PLUGIN_MODE_SELECT // If OnMode is not a null value, then change the current mode to it. @@ -599,9 +600,9 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a if (SupportsLightingApplications(endpoint)) { -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT FabricIndex fabric = commandObj->GetAccessingFabricIndex(); -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT bool globalSceneControl = false; OnOff::Attributes::GlobalSceneControl::Get(endpoint, &globalSceneControl); @@ -610,14 +611,15 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a if (globalSceneControl) { -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) { groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); } - Scenes::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); -#endif // EMBER_AF_PLUGIN_SCENES + ScenesManagement::ScenesServer::Instance().StoreCurrentScene(fabric, endpoint, groupId, + ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT OnOff::Attributes::GlobalSceneControl::Set(endpoint, false); } @@ -656,9 +658,9 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb return true; } -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT FabricIndex fabric = commandObj->GetAccessingFabricIndex(); -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT bool globalSceneControl = false; OnOff::Attributes::GlobalSceneControl::Get(endpoint, &globalSceneControl); @@ -669,15 +671,15 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb return true; } -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) { groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsIncomingGroupSession()->GetGroupId(); } - Scenes::ScenesServer::Instance().RecallScene(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); -#endif // EMBER_AF_PLUGIN_SCENES + ScenesManagement::ScenesServer::Instance().RecallScene(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); setOnOffValue(endpoint, Commands::On::Id, false); diff --git a/src/app/clusters/scenes-server/SceneHandlerImpl.h b/src/app/clusters/scenes-server/SceneHandlerImpl.h index 19eef3975ebbc3..91935d2816f0e4 100644 --- a/src/app/clusters/scenes-server/SceneHandlerImpl.h +++ b/src/app/clusters/scenes-server/SceneHandlerImpl.h @@ -35,10 +35,10 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler template using DecodableList = app::DataModel::DecodableList; - using AttributeValuePairType = app::Clusters::Scenes::Structs::AttributeValuePair::Type; - using AttributeValuePairDecodableType = app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; - using ExtensionFieldSetDecodableType = app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; - using ExtensionFieldSetType = app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; + using AttributeValuePairType = app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type; + using AttributeValuePairDecodableType = app::Clusters::ScenesManagement::Structs::AttributeValuePair::DecodableType; + using ExtensionFieldSetDecodableType = app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType; + using ExtensionFieldSetType = app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type; public: /// @brief Struct meant to map the state of a cluster to a specific endpoint. Meant to be used to apply scenes using a timer for diff --git a/src/app/clusters/scenes-server/SceneTable.h b/src/app/clusters/scenes-server/SceneTable.h index 5ee97bf1da3fe3..85fa807b576161 100644 --- a/src/app/clusters/scenes-server/SceneTable.h +++ b/src/app/clusters/scenes-server/SceneTable.h @@ -85,9 +85,10 @@ class SceneHandler : public IntrusiveListNodeBase<> /// @return CHIP_NO_ERROR if successful, CHIP_ERROR value otherwise /// @note Only gets called after the scene-cluster has previously verified that the endpoint,cluster pair is supported by /// the handler. It is therefore the implementation's reponsibility to also implement the SupportsCluster method. - virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, - MutableByteSpan & serialisedBytes) = 0; + virtual CHIP_ERROR + SerializeAdd(EndpointId endpoint, + const app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, + MutableByteSpan & serialisedBytes) = 0; /// @brief Called when handling StoreScene, and only if the handler supports the given endpoint and cluster. /// @@ -112,7 +113,7 @@ class SceneHandler : public IntrusiveListNodeBase<> /// @note Only gets called for handlers for which SupportsCluster() is true for the given endpoint and cluster. virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) = 0; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type & extensionFieldSet) = 0; /// @brief Restore a stored scene for the given cluster instance, over timeMs milliseconds (e.g. when handling RecallScene) /// diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index a0cc24a8e4516e..81cd05cd18c4f8 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -802,7 +802,7 @@ CHIP_ERROR DefaultSceneTableImpl::RemoveFabric(FabricIndex fabric_index) { VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INTERNAL); - for (auto endpoint : app::EnabledEndpointsWithServerCluster(chip::app::Clusters::Scenes::Id)) + for (auto endpoint : app::EnabledEndpointsWithServerCluster(chip::app::Clusters::ScenesManagement::Id)) { FabricSceneData fabric(endpoint, fabric_index); SceneIndex idx = 0; diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index 01801fd2dd1310..62317732eca0b9 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -29,8 +29,8 @@ namespace chip { namespace scenes { -#ifdef MATTER_SCENES_TABLE_SIZE -static constexpr uint16_t kMaxScenesPerEndpoint = MATTER_SCENES_TABLE_SIZE; +#ifdef SCENES_MANAGEMENT_TABLE_SIZE +static constexpr uint16_t kMaxScenesPerEndpoint = SCENES_MANAGEMENT_TABLE_SIZE; #else static constexpr uint16_t kMaxScenesPerEndpoint = CHIP_CONFIG_MAX_SCENES_TABLE_SIZE; #endif diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index cac001cdc2c49d..29dbab3b119cf9 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -40,12 +40,12 @@ using ExtensionFieldSet = chip::scenes::ExtensionFieldSet; using GroupDataProvider = chip::Credentials::GroupDataProvider; using SceneTable = chip::scenes::SceneTable; using AuthMode = chip::Access::AuthMode; -using ScenesServer = chip::app::Clusters::Scenes::ScenesServer; +using ScenesServer = chip::app::Clusters::ScenesManagement::ScenesServer; namespace chip { namespace app { namespace Clusters { -namespace Scenes { +namespace ScenesManagement { namespace { @@ -259,7 +259,8 @@ CHIP_ERROR ScenesServer::FabricSceneInfo::FindFabricSceneInfoIndex(EndpointId en { VerifyOrReturnError(kInvalidEndpointId != endpoint, CHIP_ERROR_INVALID_ARGUMENT); - uint16_t index = emberAfGetClusterServerEndpointIndex(endpoint, Scenes::Id, EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT); + uint16_t index = + emberAfGetClusterServerEndpointIndex(endpoint, ScenesManagement::Id, EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT); if (index < ArraySize(mSceneInfoStructs)) { @@ -1055,7 +1056,7 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce sceneTable->GetRemainingCapacity(ctx.mCommandHandler.GetAccessingFabricIndex(), capacity))); // Checks if we copy a single scene or all of them - if (req.mode.GetField(app::Clusters::Scenes::CopyModeBitmap::kCopyAllScenes)) + if (req.mode.GetField(app::Clusters::ScenesManagement::CopyModeBitmap::kCopyAllScenes)) { // Scene Table interface data SceneId scenesInGroup[scenes::kMaxScenesPerFabric]; @@ -1121,16 +1122,16 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); } -} // namespace Scenes +} // namespace ScenesManagement } // namespace Clusters } // namespace app } // namespace chip using namespace chip; using namespace chip::app::Clusters; -using namespace chip::app::Clusters::Scenes; +using namespace chip::app::Clusters::ScenesManagement; -void emberAfScenesClusterServerInitCallback(EndpointId endpoint) +void emberAfScenesManagementClusterServerInitCallback(EndpointId endpoint) { uint32_t featureMap = 0; EmberAfStatus status = Attributes::FeatureMap::Get(endpoint, &featureMap); @@ -1173,7 +1174,7 @@ void emberAfScenesClusterServerInitCallback(EndpointId endpoint) } } -void MatterScenesClusterServerShutdownCallback(EndpointId endpoint) +void MatterScenesManagementClusterServerShutdownCallback(EndpointId endpoint) { uint16_t endpointTableSize = 0; ReturnOnFailure(Attributes::SceneTableSize::Get(endpoint, &endpointTableSize)); @@ -1183,7 +1184,7 @@ void MatterScenesClusterServerShutdownCallback(EndpointId endpoint) sceneTable->RemoveEndpoint(); } -void MatterScenesPluginServerInitCallback() +void MatterScenesManagementPluginServerInitCallback() { CHIP_ERROR err = ScenesServer::Instance().Init(); if (err != CHIP_NO_ERROR) diff --git a/src/app/clusters/scenes-server/scenes-server.h b/src/app/clusters/scenes-server/scenes-server.h index 49bd1537de8734..7ddd10ca45c0ed 100644 --- a/src/app/clusters/scenes-server/scenes-server.h +++ b/src/app/clusters/scenes-server/scenes-server.h @@ -29,7 +29,7 @@ namespace chip { namespace app { namespace Clusters { -namespace Scenes { +namespace ScenesManagement { class ScenesServer : public CommandHandlerInterface, public AttributeAccessInterface { @@ -128,7 +128,7 @@ class ScenesServer : public CommandHandlerInterface, public AttributeAccessInter static ScenesServer mInstance; }; -} // namespace Scenes +} // namespace ScenesManagement } // namespace Clusters } // namespace app } // namespace chip diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index a78a3d138bbd39..b55f59074de843 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -30,9 +30,9 @@ #include #include -#ifdef EMBER_AF_PLUGIN_SCENES +#ifdef EMBER_AF_PLUGIN_SCENES_MANAGEMENT #include -#endif // EMBER_AF_PLUGIN_SCENES +#endif // EMBER_AF_PLUGIN_SCENES_MANAGEMENT using namespace chip; using namespace chip::app::Clusters; diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index c0b473cbb5317c..2605704fa89e0a 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -18,7 +18,7 @@ CommandHandlerInterfaceOnlyClusters: # CommandHandlerInterface and hence do not need generated command dispatch. # This uses asUpperCamelCase versions of the cluster name. - Network Commissioning - - Scenes + - Scenes Management - RVC Run Mode - RVC Clean Mode - Dishwasher Mode @@ -49,7 +49,7 @@ ClustersWithInitFunctions: - Thermostat - Mode Select - Sample MEI - - Scenes + - Scenes Management ClustersWithAttributeChangedFunctions: - Bridged Device Basic @@ -66,7 +66,7 @@ ClustersWithShutdownFunctions: - Level Control - Color Control - Sample MEI - - Scenes + - Scenes Management ClustersWithPreAttributeChangeFunctions: - Door Lock diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp index 3346c54dabdc6e..1ce2583c28ab27 100644 --- a/src/app/tests/TestSceneTable.cpp +++ b/src/app/tests/TestSceneTable.cpp @@ -136,13 +136,13 @@ SceneTableEntry scene14(sceneId11, sceneData14); SceneTableEntry scene15(sceneId12, sceneData15); // Clusters EFS data -static app::Clusters::Scenes::Structs::ExtensionFieldSet::Type OOextensionFieldSet; -static app::Clusters::Scenes::Structs::ExtensionFieldSet::Type LCextensionFieldSet; -static app::Clusters::Scenes::Structs::ExtensionFieldSet::Type CCextensionFieldSet; +static app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type OOextensionFieldSet; +static app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type LCextensionFieldSet; +static app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type CCextensionFieldSet; -static app::Clusters::Scenes::Structs::AttributeValuePair::Type OOPairs[1]; -static app::Clusters::Scenes::Structs::AttributeValuePair::Type LCPairs[2]; -static app::Clusters::Scenes::Structs::AttributeValuePair::Type CCPairs[8]; +static app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type OOPairs[1]; +static app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type LCPairs[2]; +static app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type CCPairs[8]; static uint8_t OO_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; static uint8_t LC_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; @@ -496,8 +496,8 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, nullptr != sceneTable); VerifyOrReturn(nullptr != sceneTable); - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type extensionFieldSetOut; - app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType extensionFieldSetIn; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type extensionFieldSetOut; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType extensionFieldSetIn; TLV::TLVReader reader; TLV::TLVWriter writer; @@ -644,9 +644,9 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext) memset(buffer, 0, buff_span.size()); // To test failure on serialize and deserialize when too many pairs are in the field sets - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type extensionFieldFailTestOut; - app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType extensionFieldFailTestIn; - app::Clusters::Scenes::Structs::AttributeValuePair::Type TooManyPairs[16]; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type extensionFieldFailTestOut; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType extensionFieldFailTestIn; + app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type TooManyPairs[16]; uint8_t payloadOk = 0; for (uint8_t i = 0; i < 16; i++) diff --git a/src/app/tests/suites/TestScenesFabricRemoval.yaml b/src/app/tests/suites/TestScenesFabricRemoval.yaml index 3acb0ebf3ae9df..5ba6ce755912df 100644 --- a/src/app/tests/suites/TestScenesFabricRemoval.yaml +++ b/src/app/tests/suites/TestScenesFabricRemoval.yaml @@ -19,7 +19,7 @@ name: Scenes Fabric Removal config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 payload: type: char_string diff --git a/src/app/tests/suites/TestScenesFabricSceneInfo.yaml b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml index 8c211e43d94f40..7a26e1e4bf2eb6 100644 --- a/src/app/tests/suites/TestScenesFabricSceneInfo.yaml +++ b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml @@ -26,7 +26,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 payload: type: char_string diff --git a/src/app/tests/suites/TestScenesMultiFabric.yaml b/src/app/tests/suites/TestScenesMultiFabric.yaml index 803b01cdd09e6b..b809165339b516 100644 --- a/src/app/tests/suites/TestScenesMultiFabric.yaml +++ b/src/app/tests/suites/TestScenesMultiFabric.yaml @@ -26,7 +26,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 payload: type: char_string diff --git a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml index c120603fe89559..c8ee4894c7c3c9 100644 --- a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml @@ -19,7 +19,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 tests: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml index b4cf135366a8b4..7b5606c0d8b050 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml @@ -22,7 +22,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 tests: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index c02547a22fef76..3be1aa9caacb5f 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 G1: type: group_id diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 95c6348f7ea02d..e0bfab2f8d1ff5 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -20,7 +20,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 G1: type: group_id diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml index 1024fd2b9aaaaa..90a6cfe045192d 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml @@ -22,7 +22,7 @@ PICS: config: nodeId: 0x12344321 - cluster: "Scenes" + cluster: "Scenes Management" endpoint: 1 G1: type: group_id diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 46c565b9d4833c..732c09fe0dc482 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -331,7 +331,7 @@ "Test_TC_G_1_1", "Test_TC_G_2_1" ], - "Scenes": [ + "ScenesManagement": [ "TestScenesFabricRemoval", "TestScenesFabricSceneInfo", "TestScenesMultiFabric", @@ -436,7 +436,7 @@ "Subscriptions", "DoorLock", "Groups", - "Scenes", + "ScenesManagement", "ResourceMonitoring" ] } diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 7ea2b10c4a0f50..ec67875d1a3161 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -282,7 +282,7 @@ "TimeSynchronization": [], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], - "Scenes": ["Test_TC_S_2_5", "Test_TC_S_2_6"], + "ScenesManagement": ["Test_TC_S_2_5", "Test_TC_S_2_6"], "PumpConfigurationControl": [], "AccessControl": [], "UserLabel": [], @@ -352,7 +352,7 @@ "TimeSynchronization", "UnitLocalization", "Binding", - "Scenes", + "ScenesManagement", "PumpConfigurationControl", "AccessControl", "UserLabel", diff --git a/src/app/util/mock/include/zap-generated/gen_config.h b/src/app/util/mock/include/zap-generated/gen_config.h index 60d57388626fa6..8488bc9c8700ca 100644 --- a/src/app/util/mock/include/zap-generated/gen_config.h +++ b/src/app/util/mock/include/zap-generated/gen_config.h @@ -18,4 +18,4 @@ #pragma once #define EMBER_BINDING_TABLE_SIZE 20 -#define MATTER_SCENES_TABLE_SIZE 24 +#define SCENES_MANAGEMENT_TABLE_SIZE 24 diff --git a/src/app/zap-templates/templates/app/gen_config.zapt b/src/app/zap-templates/templates/app/gen_config.zapt index 4accc4a61be151..65a7705b459036 100644 --- a/src/app/zap-templates/templates/app/gen_config.zapt +++ b/src/app/zap-templates/templates/app/gen_config.zapt @@ -38,7 +38,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 {{/if}} -{{else if (is_str_equal name "Scenes")}} +{{else if (is_str_equal name "Scenes Management")}} {{#if (is_server side)}} // User options for {{side}} plugin {{name}} {{/if}} @@ -49,14 +49,14 @@ // App cluster specs 1.4.4 #define MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK 0x0001 #define MATTER_CLUSTER_SCENE_NAME_SUPPORT ({{asHex defaultValue 4}} & MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK) -// Scenes FeatureMap Table Size feature used for the MATTER_SCENES_TABLE_SIZE define +// Scenes FeatureMap Table Size feature used for the SCENES_MANAGEMENT_TABLE_SIZE define // App cluster specs 1.4.4.2 #define MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK 0x0001 #define MATTER_CLUSTER_TABLE_SIZE_SUPPORT ({{asHex defaultValue 4}} & MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK) {{/if}} {{#if (is_str_equal name "SceneTableSize")}} // Cluster spec 1.4.8.7 -#define MATTER_SCENES_TABLE_SIZE {{defaultValue}} +#define SCENES_MANAGEMENT_TABLE_SIZE {{defaultValue}} {{/if}} {{/if}} {{/all_user_cluster_generated_attributes}} diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index 85805353abb9ca..7fd03bd0bf41aa 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -217,7 +217,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -305,7 +305,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -390,7 +390,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -491,7 +491,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -594,7 +594,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -675,7 +675,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -760,7 +760,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -839,7 +839,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -900,7 +900,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -962,7 +962,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_NAME_SUPPORT AddScene AddSceneResponse @@ -1010,7 +1010,7 @@ limitations under the License. - + @@ -1057,7 +1057,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1332,7 +1332,7 @@ limitations under the License. BINDING - + @@ -1408,7 +1408,7 @@ limitations under the License. CLIENT_LIST PARTS_LIST - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1469,7 +1469,7 @@ limitations under the License. BINDING - + @@ -1512,7 +1512,7 @@ limitations under the License. RemoveAllGroups AddGroupIfIdentifying - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1563,7 +1563,7 @@ limitations under the License. BINDING - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP @@ -1869,7 +1869,7 @@ limitations under the License. - + @@ -2309,7 +2309,7 @@ limitations under the License. On Toggle - + SCENE_COUNT CURRENT_SCENE CURRENT_GROUP diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index b1273514dd9f04..a733de7de78711 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -16,17 +16,17 @@ limitations under the License. --> - + - + - + @@ -35,23 +35,23 @@ limitations under the License. - + - + - Scenes + Scenes Management General Attributes and commands for scene configuration and manipulation. - 0x0005 + 0x0062 SCENES_CLUSTER true true @@ -244,7 +244,7 @@ limitations under the License. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d99ab989625a54..28f9582073a57f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -128,199 +128,6 @@ cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster Scenes = 5 { - revision 5; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - kExplicit = 0x2; - kTableSize = 0x4; - kFabricScenes = 0x8; - } - - bitmap NameSupportBitmap : bitmap8 { - kSceneNames = 0x80; - } - - struct AttributeValuePair { - attrib_id attributeID = 0; - int32u attributeValue = 1; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional int8u sceneCount = 0; - readonly attribute optional int8u currentScene = 1; - readonly attribute optional group_id currentGroup = 2; - readonly attribute optional boolean sceneValid = 3; - readonly attribute NameSupportBitmap nameSupport = 4; - readonly attribute optional nullable node_id lastConfiguredBy = 5; - readonly attribute int16u sceneTableSize = 6; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int16u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct EnhancedAddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int16u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct EnhancedAddSceneResponse = 64 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct EnhancedViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct EnhancedViewSceneResponse = 65 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int16u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 66 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ - fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; - /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ - fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; -} - /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -3904,6 +3711,199 @@ cluster RvcOperationalState = 97 { command Resume(): OperationalCommandResponse = 3; } +/** Attributes and commands for scene configuration and manipulation. */ +provisional cluster ScenesManagement = 98 { + revision 5; + + bitmap CopyModeBitmap : bitmap8 { + kCopyAllScenes = 0x1; + } + + bitmap Feature : bitmap32 { + kSceneNames = 0x1; + kExplicit = 0x2; + kTableSize = 0x4; + kFabricScenes = 0x8; + } + + bitmap NameSupportBitmap : bitmap8 { + kSceneNames = 0x80; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; + readonly attribute NameSupportBitmap nameSupport = 4; + readonly attribute optional nullable node_id lastConfiguredBy = 5; + readonly attribute int16u sceneTableSize = 6; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; + } + + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } + + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + } + + response struct EnhancedViewSceneResponse = 65 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + optional int16u transitionTime = 3; + optional char_string sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; + } + + response struct CopySceneResponse = 66 { + status status = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + } + + /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' */ + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + /** Retrieves the requested scene entry from its Scene table. */ + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + /** Allows a scene to be added using a finer scene transition time than the AddScene command. */ + fabric command EnhancedAddScene(EnhancedAddSceneRequest): EnhancedAddSceneResponse = 64; + /** Allows a scene to be retrieved using a finer scene transition time than the ViewScene command */ + fabric command EnhancedViewScene(EnhancedViewSceneRequest): EnhancedViewSceneResponse = 65; + /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ + fabric command CopyScene(CopySceneRequest): CopySceneResponse = 66; +} + /** Attributes and commands for monitoring HEPA filters in a device */ cluster HepaFilterMonitoring = 113 { revision 1; // NOTE: Default/not specifically set diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 53ce1b49183816..1b3b7263e52b36 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -213,8 +213,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "client", diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 110ea806adc10e..ff25d92b121c8c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -1002,17 +1002,14 @@ public void onSuccess(byte[] tlv) { } } - public static class ScenesCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 5L; + public static class OnOffCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 6L; - private static final long SCENE_COUNT_ATTRIBUTE_ID = 0L; - private static final long CURRENT_SCENE_ATTRIBUTE_ID = 1L; - private static final long CURRENT_GROUP_ATTRIBUTE_ID = 2L; - private static final long SCENE_VALID_ATTRIBUTE_ID = 3L; - private static final long NAME_SUPPORT_ATTRIBUTE_ID = 4L; - private static final long LAST_CONFIGURED_BY_ATTRIBUTE_ID = 5L; - private static final long SCENE_TABLE_SIZE_ATTRIBUTE_ID = 6L; - private static final long FABRIC_SCENE_INFO_ATTRIBUTE_ID = 7L; + private static final long ON_OFF_ATTRIBUTE_ID = 0L; + private static final long GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID = 16384L; + private static final long ON_TIME_ATTRIBUTE_ID = 16385L; + private static final long OFF_WAIT_TIME_ATTRIBUTE_ID = 16386L; + private static final long START_UP_ON_OFF_ATTRIBUTE_ID = 16387L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -1020,7 +1017,7 @@ public static class ScenesCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ScenesCluster(long devicePtr, int endpointId) { + public OnOffCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -1030,287 +1027,113 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void addScene(AddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { - addScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); + public void off(DefaultClusterCallback callback) { + off(callback, 0); } - public void addScene(AddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, int timedInvokeTimeoutMs) { + public void off(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - - final long sceneNameFieldID = 3L; - BaseTLVType sceneNametlvValue = new StringType(sceneName); - elements.add(new StructElement(sceneNameFieldID, sceneNametlvValue)); - - final long extensionFieldSetsFieldID = 4L; - BaseTLVType extensionFieldSetstlvValue = ArrayType.generateArrayType(extensionFieldSets, (elementextensionFieldSets) -> elementextensionFieldSets.encodeTlv()); - elements.add(new StructElement(extensionFieldSetsFieldID, extensionFieldSetstlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(status, groupID, sceneID); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void viewScene(ViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { - viewScene(callback, groupID, sceneID, 0); + public void on(DefaultClusterCallback callback) { + on(callback, 0); } - public void viewScene(ViewSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + public void on(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - final long transitionTimeFieldID = 3L; - Optional transitionTime = Optional.empty(); - final long sceneNameFieldID = 4L; - Optional sceneName = Optional.empty(); - final long extensionFieldSetsFieldID = 5L; - Optional> extensionFieldSets = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == transitionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - transitionTime = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == sceneNameFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - sceneName = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == extensionFieldSetsFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - extensionFieldSets = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ScenesClusterExtensionFieldSet.decodeTlv(elementcastingValue))); - } - } - } - callback.onSuccess(status, groupID, sceneID, transitionTime, sceneName, extensionFieldSets); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID) { - removeScene(callback, groupID, sceneID, 0); + public void toggle(DefaultClusterCallback callback) { + toggle(callback, 0); } - public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(status, groupID, sceneID); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID) { - removeAllScenes(callback, groupID, 0); + public void offWithEffect(DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant) { + offWithEffect(callback, effectIdentifier, effectVariant, 0); } - public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { - final long commandId = 3L; + public void offWithEffect(DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant, int timedInvokeTimeoutMs) { + final long commandId = 64L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + final long effectIdentifierFieldID = 0L; + BaseTLVType effectIdentifiertlvValue = new UIntType(effectIdentifier); + elements.add(new StructElement(effectIdentifierFieldID, effectIdentifiertlvValue)); + + final long effectVariantFieldID = 1L; + BaseTLVType effectVarianttlvValue = new UIntType(effectVariant); + elements.add(new StructElement(effectVariantFieldID, effectVarianttlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(status, groupID); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID) { - storeScene(callback, groupID, sceneID, 0); + public void onWithRecallGlobalScene(DefaultClusterCallback callback) { + onWithRecallGlobalScene(callback, 0); } - public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { - final long commandId = 4L; + public void onWithRecallGlobalScene(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 65L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(status, groupID, sceneID); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { - recallScene(callback, groupID, sceneID, transitionTime, 0); + public void onWithTimedOff(DefaultClusterCallback callback, Integer onOffControl, Integer onTime, Integer offWaitTime) { + onWithTimedOff(callback, onOffControl, onTime, offWaitTime, 0); } - public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime, int timedInvokeTimeoutMs) { - final long commandId = 5L; + public void onWithTimedOff(DefaultClusterCallback callback, Integer onOffControl, Integer onTime, Integer offWaitTime, int timedInvokeTimeoutMs) { + final long commandId = 66L; ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + final long onOffControlFieldID = 0L; + BaseTLVType onOffControltlvValue = new UIntType(onOffControl); + elements.add(new StructElement(onOffControlFieldID, onOffControltlvValue)); - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = transitionTime != null ? transitionTime.map((nonOptionaltransitionTime) -> new UIntType(nonOptionaltransitionTime)).orElse(new EmptyType()) : new NullType(); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + final long onTimeFieldID = 1L; + BaseTLVType onTimetlvValue = new UIntType(onTime); + elements.add(new StructElement(onTimeFieldID, onTimetlvValue)); + + final long offWaitTimeFieldID = 2L; + BaseTLVType offWaitTimetlvValue = new UIntType(offWaitTime); + elements.add(new StructElement(offWaitTimeFieldID, offWaitTimetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -1320,459 +1143,306 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID) { - getSceneMembership(callback, groupID, 0); + public interface StartUpOnOffAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } - public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { - final long commandId = 6L; - - ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long capacityFieldID = 1L; - @Nullable Integer capacity = null; - final long groupIDFieldID = 2L; - Integer groupID = null; - final long sceneListFieldID = 3L; - Optional> sceneList = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == capacityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - capacity = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneListFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - sceneList = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class))); - } - } - } - callback.onSuccess(status, capacity, groupID, sceneList); - }}, commandId, value, timedInvokeTimeoutMs); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { - enhancedAddScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, int timedInvokeTimeoutMs) { - final long commandId = 64L; - - ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + public void readOnOffAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_ATTRIBUTE_ID); - final long sceneNameFieldID = 3L; - BaseTLVType sceneNametlvValue = new StringType(sceneName); - elements.add(new StructElement(sceneNameFieldID, sceneNametlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ON_OFF_ATTRIBUTE_ID, true); + } - final long extensionFieldSetsFieldID = 4L; - BaseTLVType extensionFieldSetstlvValue = ArrayType.generateArrayType(extensionFieldSets, (elementextensionFieldSets) -> elementextensionFieldSets.encodeTlv()); - elements.add(new StructElement(extensionFieldSetsFieldID, extensionFieldSetstlvValue)); + public void subscribeOnOffAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(status, groupID, sceneID); - }}, commandId, value, timedInvokeTimeoutMs); + }, ON_OFF_ATTRIBUTE_ID, minInterval, maxInterval); } - public void enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { - enhancedViewScene(callback, groupID, sceneID, 0); + public void readGlobalSceneControlAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID, true); } - public void enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { - final long commandId = 65L; + public void subscribeGlobalSceneControlAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long groupIDFieldID = 0L; - BaseTLVType groupIDtlvValue = new UIntType(groupID); - elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long sceneIDFieldID = 1L; - BaseTLVType sceneIDtlvValue = new UIntType(sceneID); - elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + public void readOnTimeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TIME_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIDFieldID = 1L; - Integer groupID = null; - final long sceneIDFieldID = 2L; - Integer sceneID = null; - final long transitionTimeFieldID = 3L; - Optional transitionTime = Optional.empty(); - final long sceneNameFieldID = 4L; - Optional sceneName = Optional.empty(); - final long extensionFieldSetsFieldID = 5L; - Optional> extensionFieldSets = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIDFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneID = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == transitionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - transitionTime = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == sceneNameFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - sceneName = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == extensionFieldSetsFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - extensionFieldSets = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ScenesClusterExtensionFieldSet.decodeTlv(elementcastingValue))); - } - } + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); } - callback.onSuccess(status, groupID, sceneID, transitionTime, sceneName, extensionFieldSets); - }}, commandId, value, timedInvokeTimeoutMs); + }, ON_TIME_ATTRIBUTE_ID, true); } - public void copyScene(CopySceneResponseCallback callback, Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo) { - copyScene(callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, 0); + public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnTimeAttribute(callback, value, 0); } - public void copyScene(CopySceneResponseCallback callback, Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo, int timedInvokeTimeoutMs) { - final long commandId = 66L; + public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - ArrayList elements = new ArrayList<>(); - final long modeFieldID = 0L; - BaseTLVType modetlvValue = new UIntType(mode); - elements.add(new StructElement(modeFieldID, modetlvValue)); + public void subscribeOnTimeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TIME_ATTRIBUTE_ID); - final long groupIdentifierFromFieldID = 1L; - BaseTLVType groupIdentifierFromtlvValue = new UIntType(groupIdentifierFrom); - elements.add(new StructElement(groupIdentifierFromFieldID, groupIdentifierFromtlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ON_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long sceneIdentifierFromFieldID = 2L; - BaseTLVType sceneIdentifierFromtlvValue = new UIntType(sceneIdentifierFrom); - elements.add(new StructElement(sceneIdentifierFromFieldID, sceneIdentifierFromtlvValue)); - - final long groupIdentifierToFieldID = 3L; - BaseTLVType groupIdentifierTotlvValue = new UIntType(groupIdentifierTo); - elements.add(new StructElement(groupIdentifierToFieldID, groupIdentifierTotlvValue)); - - final long sceneIdentifierToFieldID = 4L; - BaseTLVType sceneIdentifierTotlvValue = new UIntType(sceneIdentifierTo); - elements.add(new StructElement(sceneIdentifierToFieldID, sceneIdentifierTotlvValue)); + public void readOffWaitTimeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_WAIT_TIME_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long groupIdentifierFromFieldID = 1L; - Integer groupIdentifierFrom = null; - final long sceneIdentifierFromFieldID = 2L; - Integer sceneIdentifierFrom = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == groupIdentifierFromFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - groupIdentifierFrom = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == sceneIdentifierFromFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneIdentifierFrom = castingValue.value(Integer.class); - } - } + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); } - callback.onSuccess(status, groupIdentifierFrom, sceneIdentifierFrom); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface AddSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - } - - public interface ViewSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); - } - - public interface RemoveSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - } - - public interface RemoveAllScenesResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID); - } - - public interface StoreSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - } - - public interface GetSceneMembershipResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList); - } - - public interface EnhancedAddSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID); - } - - public interface EnhancedViewSceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); - } - - public interface CopySceneResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom); - } - - public interface LastConfiguredByAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface FabricSceneInfoAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + }, OFF_WAIT_TIME_ATTRIBUTE_ID, true); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOffWaitTimeAttribute(callback, value, 0); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), OFF_WAIT_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeOffWaitTimeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_WAIT_TIME_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OFF_WAIT_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSceneCountAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_COUNT_ATTRIBUTE_ID); + public void readStartUpOnOffAttribute( + StartUpOnOffAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_ON_OFF_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SCENE_COUNT_ATTRIBUTE_ID, true); + }, START_UP_ON_OFF_ATTRIBUTE_ID, true); } - public void subscribeSceneCountAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_COUNT_ATTRIBUTE_ID); + public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpOnOffAttribute(callback, value, 0); + } + + public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_ON_OFF_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpOnOffAttribute( + StartUpOnOffAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_ON_OFF_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SCENE_COUNT_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_UP_ON_OFF_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentSceneAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SCENE_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_SCENE_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeCurrentSceneAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SCENE_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_SCENE_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentGroupAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_GROUP_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_GROUP_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeCurrentGroupAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_GROUP_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_GROUP_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSceneValidAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_VALID_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SCENE_VALID_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeSceneValidAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_VALID_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SCENE_VALID_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNameSupportAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NAME_SUPPORT_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, NAME_SUPPORT_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeNameSupportAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NAME_SUPPORT_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, NAME_SUPPORT_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLastConfiguredByAttribute( - LastConfiguredByAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONFIGURED_BY_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LAST_CONFIGURED_BY_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeLastConfiguredByAttribute( - LastConfiguredByAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONFIGURED_BY_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LAST_CONFIGURED_BY_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSceneTableSizeAttribute( + public void readClusterRevisionAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_TABLE_SIZE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -1780,49 +1450,117 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeSceneTableSizeAttribute( + public void subscribeClusterRevisionAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_TABLE_SIZE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readFabricSceneInfoAttribute( - FabricSceneInfoAttributeCallback callback) { - readFabricSceneInfoAttributeWithFabricFilter(callback, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readFabricSceneInfoAttributeWithFabricFilter( - FabricSceneInfoAttributeCallback callback, boolean isFabricFiltered) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); + public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 7L; + + private static final long SWITCH_TYPE_ATTRIBUTE_ID = 0L; + private static final long SWITCH_ACTIONS_ATTRIBUTE_ID = 16L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readSwitchTypeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, isFabricFiltered); + }, SWITCH_TYPE_ATTRIBUTE_ID, true); } - public void subscribeFabricSceneInfoAttribute( - FabricSceneInfoAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); + public void subscribeSwitchTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, minInterval, maxInterval); + }, SWITCH_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSwitchActionsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SWITCH_ACTIONS_ATTRIBUTE_ID, true); + } + + public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { + writeSwitchActionsAttribute(callback, value, 0); + } + + public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SWITCH_ACTIONS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSwitchActionsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SWITCH_ACTIONS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -1976,14 +1714,23 @@ public void onSuccess(byte[] tlv) { } } - public static class OnOffCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 6L; + public static class LevelControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 8L; - private static final long ON_OFF_ATTRIBUTE_ID = 0L; - private static final long GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID = 16384L; - private static final long ON_TIME_ATTRIBUTE_ID = 16385L; - private static final long OFF_WAIT_TIME_ATTRIBUTE_ID = 16386L; - private static final long START_UP_ON_OFF_ATTRIBUTE_ID = 16387L; + private static final long CURRENT_LEVEL_ATTRIBUTE_ID = 0L; + private static final long REMAINING_TIME_ATTRIBUTE_ID = 1L; + private static final long MIN_LEVEL_ATTRIBUTE_ID = 2L; + private static final long MAX_LEVEL_ATTRIBUTE_ID = 3L; + private static final long CURRENT_FREQUENCY_ATTRIBUTE_ID = 4L; + private static final long MIN_FREQUENCY_ATTRIBUTE_ID = 5L; + private static final long MAX_FREQUENCY_ATTRIBUTE_ID = 6L; + private static final long OPTIONS_ATTRIBUTE_ID = 15L; + private static final long ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID = 16L; + private static final long ON_LEVEL_ATTRIBUTE_ID = 17L; + private static final long ON_TRANSITION_TIME_ATTRIBUTE_ID = 18L; + private static final long OFF_TRANSITION_TIME_ATTRIBUTE_ID = 19L; + private static final long DEFAULT_MOVE_RATE_ATTRIBUTE_ID = 20L; + private static final long START_UP_CURRENT_LEVEL_ATTRIBUTE_ID = 16384L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -1991,7 +1738,7 @@ public static class OnOffCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OnOffCluster(long devicePtr, int endpointId) { + public LevelControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -2001,14 +1748,30 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void off(DefaultClusterCallback callback) { - off(callback, 0); + public void moveToLevel(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToLevel(callback, level, transitionTime, optionsMask, optionsOverride, 0); } - public void off(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void moveToLevel(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); + final long levelFieldID = 0L; + BaseTLVType leveltlvValue = new UIntType(level); + elements.add(new StructElement(levelFieldID, leveltlvValue)); + + final long transitionTimeFieldID = 1L; + BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + + final long optionsMaskFieldID = 2L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 3L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -2017,14 +1780,30 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void on(DefaultClusterCallback callback) { - on(callback, 0); + public void move(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { + move(callback, moveMode, rate, optionsMask, optionsOverride, 0); } - public void on(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void move(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); + final long moveModeFieldID = 0L; + BaseTLVType moveModetlvValue = new UIntType(moveMode); + elements.add(new StructElement(moveModeFieldID, moveModetlvValue)); + + final long rateFieldID = 1L; + BaseTLVType ratetlvValue = rate != null ? new UIntType(rate) : new NullType(); + elements.add(new StructElement(rateFieldID, ratetlvValue)); + + final long optionsMaskFieldID = 2L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 3L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -2033,37 +1812,33 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void toggle(DefaultClusterCallback callback) { - toggle(callback, 0); + public void step(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + step(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, 0); } - public void toggle(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void step(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } + final long stepModeFieldID = 0L; + BaseTLVType stepModetlvValue = new UIntType(stepMode); + elements.add(new StructElement(stepModeFieldID, stepModetlvValue)); - public void offWithEffect(DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant) { - offWithEffect(callback, effectIdentifier, effectVariant, 0); - } + final long stepSizeFieldID = 1L; + BaseTLVType stepSizetlvValue = new UIntType(stepSize); + elements.add(new StructElement(stepSizeFieldID, stepSizetlvValue)); - public void offWithEffect(DefaultClusterCallback callback, Integer effectIdentifier, Integer effectVariant, int timedInvokeTimeoutMs) { - final long commandId = 64L; + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - ArrayList elements = new ArrayList<>(); - final long effectIdentifierFieldID = 0L; - BaseTLVType effectIdentifiertlvValue = new UIntType(effectIdentifier); - elements.add(new StructElement(effectIdentifierFieldID, effectIdentifiertlvValue)); + final long optionsMaskFieldID = 3L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); - final long effectVariantFieldID = 1L; - BaseTLVType effectVarianttlvValue = new UIntType(effectVariant); - elements.add(new StructElement(effectVariantFieldID, effectVarianttlvValue)); + final long optionsOverrideFieldID = 4L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -2073,14 +1848,22 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void onWithRecallGlobalScene(DefaultClusterCallback callback) { - onWithRecallGlobalScene(callback, 0); + public void stop(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stop(callback, optionsMask, optionsOverride, 0); } - public void onWithRecallGlobalScene(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 65L; + public void stop(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { + final long commandId = 3L; ArrayList elements = new ArrayList<>(); + final long optionsMaskFieldID = 0L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 1L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -2089,25 +1872,29 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void onWithTimedOff(DefaultClusterCallback callback, Integer onOffControl, Integer onTime, Integer offWaitTime) { - onWithTimedOff(callback, onOffControl, onTime, offWaitTime, 0); + public void moveToLevelWithOnOff(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToLevelWithOnOff(callback, level, transitionTime, optionsMask, optionsOverride, 0); } - public void onWithTimedOff(DefaultClusterCallback callback, Integer onOffControl, Integer onTime, Integer offWaitTime, int timedInvokeTimeoutMs) { - final long commandId = 66L; + public void moveToLevelWithOnOff(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { + final long commandId = 4L; ArrayList elements = new ArrayList<>(); - final long onOffControlFieldID = 0L; - BaseTLVType onOffControltlvValue = new UIntType(onOffControl); - elements.add(new StructElement(onOffControlFieldID, onOffControltlvValue)); + final long levelFieldID = 0L; + BaseTLVType leveltlvValue = new UIntType(level); + elements.add(new StructElement(levelFieldID, leveltlvValue)); - final long onTimeFieldID = 1L; - BaseTLVType onTimetlvValue = new UIntType(onTime); - elements.add(new StructElement(onTimeFieldID, onTimetlvValue)); + final long transitionTimeFieldID = 1L; + BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - final long offWaitTimeFieldID = 2L; - BaseTLVType offWaitTimetlvValue = new UIntType(offWaitTime); - elements.add(new StructElement(offWaitTimeFieldID, offWaitTimetlvValue)); + final long optionsMaskFieldID = 2L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 3L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -2117,16 +1904,148 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public interface StartUpOnOffAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { + moveWithOnOff(callback, moveMode, rate, optionsMask, optionsOverride, 0); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { + final long commandId = 5L; - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + ArrayList elements = new ArrayList<>(); + final long moveModeFieldID = 0L; + BaseTLVType moveModetlvValue = new UIntType(moveMode); + elements.add(new StructElement(moveModeFieldID, moveModetlvValue)); + + final long rateFieldID = 1L; + BaseTLVType ratetlvValue = rate != null ? new UIntType(rate) : new NullType(); + elements.add(new StructElement(rateFieldID, ratetlvValue)); + + final long optionsMaskFieldID = 2L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 3L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void stepWithOnOff(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + stepWithOnOff(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, 0); + } + + public void stepWithOnOff(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long stepModeFieldID = 0L; + BaseTLVType stepModetlvValue = new UIntType(stepMode); + elements.add(new StructElement(stepModeFieldID, stepModetlvValue)); + + final long stepSizeFieldID = 1L; + BaseTLVType stepSizetlvValue = new UIntType(stepSize); + elements.add(new StructElement(stepSizeFieldID, stepSizetlvValue)); + + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + + final long optionsMaskFieldID = 3L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 4L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void stopWithOnOff(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { + stopWithOnOff(callback, optionsMask, optionsOverride, 0); + } + + public void stopWithOnOff(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + final long optionsMaskFieldID = 0L; + BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); + elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + + final long optionsOverrideFieldID = 1L; + BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); + elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void moveToClosestFrequency(DefaultClusterCallback callback, Integer frequency) { + moveToClosestFrequency(callback, frequency, 0); + } + + public void moveToClosestFrequency(DefaultClusterCallback callback, Integer frequency, int timedInvokeTimeoutMs) { + final long commandId = 8L; + + ArrayList elements = new ArrayList<>(); + final long frequencyFieldID = 0L; + BaseTLVType frequencytlvValue = new UIntType(frequency); + elements.add(new StructElement(frequencyFieldID, frequencytlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface CurrentLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OnLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OnTransitionTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OffTransitionTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface DefaultMoveRateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface StartUpCurrentLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface EventListAttributeCallback extends BaseAttributeCallback { @@ -2137,59 +2056,59 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readOnOffAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_ATTRIBUTE_ID); + public void readCurrentLevelAttribute( + CurrentLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_OFF_ATTRIBUTE_ID, true); + }, CURRENT_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeOnOffAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_ATTRIBUTE_ID); + public void subscribeCurrentLevelAttribute( + CurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_OFF_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGlobalSceneControlAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID); + public void readRemainingTimeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID, true); + }, REMAINING_TIME_ATTRIBUTE_ID, true); } - public void subscribeGlobalSceneControlAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID); + public void subscribeRemainingTimeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GLOBAL_SCENE_CONTROL_ATTRIBUTE_ID, minInterval, maxInterval); + }, REMAINING_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnTimeAttribute( + public void readMinLevelAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -2197,33 +2116,24 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_TIME_ATTRIBUTE_ID, true); - } - - public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTimeAttribute(callback, value, 0); - } - - public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, MIN_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeOnTimeAttribute( + public void subscribeMinLevelAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOffWaitTimeAttribute( + public void readMaxLevelAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_WAIT_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -2231,327 +2141,349 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OFF_WAIT_TIME_ATTRIBUTE_ID, true); - } - - public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffWaitTimeAttribute(callback, value, 0); - } - - public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), OFF_WAIT_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, MAX_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeOffWaitTimeAttribute( + public void subscribeMaxLevelAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_WAIT_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OFF_WAIT_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpOnOffAttribute( - StartUpOnOffAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_ON_OFF_ATTRIBUTE_ID); + public void readCurrentFrequencyAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FREQUENCY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, START_UP_ON_OFF_ATTRIBUTE_ID, true); - } - - public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpOnOffAttribute(callback, value, 0); - } - - public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_ON_OFF_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CURRENT_FREQUENCY_ATTRIBUTE_ID, true); } - public void subscribeStartUpOnOffAttribute( - StartUpOnOffAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_ON_OFF_ATTRIBUTE_ID); + public void subscribeCurrentFrequencyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FREQUENCY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, START_UP_ON_OFF_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readMinFrequencyAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_FREQUENCY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, MIN_FREQUENCY_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeMinFrequencyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_FREQUENCY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readMaxFrequencyAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_FREQUENCY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, MAX_FREQUENCY_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeMaxFrequencyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_FREQUENCY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readOptionsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPTIONS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, OPTIONS_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { + writeOptionsAttribute(callback, value, 0); + } + + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), OPTIONS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOptionsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPTIONS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPTIONS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readOnOffTransitionTimeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnOffTransitionTimeAttribute(callback, value, 0); + } + + public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnOffTransitionTimeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readOnLevelAttribute( + OnLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, ON_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeOnLevelAttribute(callback, value, 0); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void subscribeOnLevelAttribute( + OnLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_LEVEL_ATTRIBUTE_ID); - readAttribute(new ReportCallbackImpl(callback, path) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, ON_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void readOnTransitionTimeAttribute( + OnTransitionTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TRANSITION_TIME_ATTRIBUTE_ID); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 7L; - - private static final long SWITCH_TYPE_ATTRIBUTE_ID = 0L; - private static final long SWITCH_ACTIONS_ATTRIBUTE_ID = 16L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; + }, ON_TRANSITION_TIME_ATTRIBUTE_ID, true); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnTransitionTimeAttribute(callback, value, 0); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeOnTransitionTimeAttribute( + OnTransitionTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TRANSITION_TIME_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ON_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSwitchTypeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); + public void readOffTransitionTimeAttribute( + OffTransitionTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_TRANSITION_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SWITCH_TYPE_ATTRIBUTE_ID, true); + }, OFF_TRANSITION_TIME_ATTRIBUTE_ID, true); } - public void subscribeSwitchTypeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOffTransitionTimeAttribute(callback, value, 0); + } + + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), OFF_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOffTransitionTimeAttribute( + OffTransitionTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_TRANSITION_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SWITCH_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + }, OFF_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSwitchActionsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); + public void readDefaultMoveRateAttribute( + DefaultMoveRateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_MOVE_RATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SWITCH_ACTIONS_ATTRIBUTE_ID, true); + }, DEFAULT_MOVE_RATE_ATTRIBUTE_ID, true); } - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { - writeSwitchActionsAttribute(callback, value, 0); + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { + writeDefaultMoveRateAttribute(callback, value, 0); } - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), SWITCH_ACTIONS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_MOVE_RATE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeSwitchActionsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); + public void subscribeDefaultMoveRateAttribute( + DefaultMoveRateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_MOVE_RATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SWITCH_ACTIONS_ATTRIBUTE_ID, minInterval, maxInterval); + }, DEFAULT_MOVE_RATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readStartUpCurrentLevelAttribute( + StartUpCurrentLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpCurrentLevelAttribute(callback, value, 0); + } + + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpCurrentLevelAttribute( + StartUpCurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @@ -2688,23 +2620,18 @@ public void onSuccess(byte[] tlv) { } } - public static class LevelControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 8L; + public static class BinaryInputBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 15L; - private static final long CURRENT_LEVEL_ATTRIBUTE_ID = 0L; - private static final long REMAINING_TIME_ATTRIBUTE_ID = 1L; - private static final long MIN_LEVEL_ATTRIBUTE_ID = 2L; - private static final long MAX_LEVEL_ATTRIBUTE_ID = 3L; - private static final long CURRENT_FREQUENCY_ATTRIBUTE_ID = 4L; - private static final long MIN_FREQUENCY_ATTRIBUTE_ID = 5L; - private static final long MAX_FREQUENCY_ATTRIBUTE_ID = 6L; - private static final long OPTIONS_ATTRIBUTE_ID = 15L; - private static final long ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID = 16L; - private static final long ON_LEVEL_ATTRIBUTE_ID = 17L; - private static final long ON_TRANSITION_TIME_ATTRIBUTE_ID = 18L; - private static final long OFF_TRANSITION_TIME_ATTRIBUTE_ID = 19L; - private static final long DEFAULT_MOVE_RATE_ATTRIBUTE_ID = 20L; - private static final long START_UP_CURRENT_LEVEL_ATTRIBUTE_ID = 16384L; + private static final long ACTIVE_TEXT_ATTRIBUTE_ID = 4L; + private static final long DESCRIPTION_ATTRIBUTE_ID = 28L; + private static final long INACTIVE_TEXT_ATTRIBUTE_ID = 46L; + private static final long OUT_OF_SERVICE_ATTRIBUTE_ID = 81L; + private static final long POLARITY_ATTRIBUTE_ID = 84L; + private static final long PRESENT_VALUE_ATTRIBUTE_ID = 85L; + private static final long RELIABILITY_ATTRIBUTE_ID = 103L; + private static final long STATUS_FLAGS_ATTRIBUTE_ID = 111L; + private static final long APPLICATION_TYPE_ATTRIBUTE_ID = 256L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -2712,7 +2639,7 @@ public static class LevelControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LevelControlCluster(long devicePtr, int endpointId) { + public BinaryInputBasicCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -2722,342 +2649,220 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void moveToLevel(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToLevel(callback, level, transitionTime, optionsMask, optionsOverride, 0); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void moveToLevel(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long levelFieldID = 0L; - BaseTLVType leveltlvValue = new UIntType(level); - elements.add(new StructElement(levelFieldID, leveltlvValue)); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long transitionTimeFieldID = 1L; - BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long optionsMaskFieldID = 2L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long optionsOverrideFieldID = 3L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + public void readActiveTextAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_TEXT_ATTRIBUTE_ID, true); } - public void move(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { - move(callback, moveMode, rate, optionsMask, optionsOverride, 0); + public void writeActiveTextAttribute(DefaultClusterCallback callback, String value) { + writeActiveTextAttribute(callback, value, 0); } - public void move(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - final long moveModeFieldID = 0L; - BaseTLVType moveModetlvValue = new UIntType(moveMode); - elements.add(new StructElement(moveModeFieldID, moveModetlvValue)); + public void writeActiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - final long rateFieldID = 1L; - BaseTLVType ratetlvValue = rate != null ? new UIntType(rate) : new NullType(); - elements.add(new StructElement(rateFieldID, ratetlvValue)); + public void subscribeActiveTextAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); - final long optionsMaskFieldID = 2L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long optionsOverrideFieldID = 3L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + public void readDescriptionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DESCRIPTION_ATTRIBUTE_ID, true); } - public void step(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - step(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, 0); + public void writeDescriptionAttribute(DefaultClusterCallback callback, String value) { + writeDescriptionAttribute(callback, value, 0); } - public void step(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long stepModeFieldID = 0L; - BaseTLVType stepModetlvValue = new UIntType(stepMode); - elements.add(new StructElement(stepModeFieldID, stepModetlvValue)); - - final long stepSizeFieldID = 1L; - BaseTLVType stepSizetlvValue = new UIntType(stepSize); - elements.add(new StructElement(stepSizeFieldID, stepSizetlvValue)); + public void writeDescriptionAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), DESCRIPTION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - final long optionsMaskFieldID = 3L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long optionsOverrideFieldID = 4L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + public void readInactiveTextAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, INACTIVE_TEXT_ATTRIBUTE_ID, true); } - public void stop(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { - stop(callback, optionsMask, optionsOverride, 0); + public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value) { + writeInactiveTextAttribute(callback, value, 0); } - public void stop(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 3L; + public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), INACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - ArrayList elements = new ArrayList<>(); - final long optionsMaskFieldID = 0L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); + public void subscribeInactiveTextAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); - final long optionsOverrideFieldID = 1L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, INACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + public void readOutOfServiceAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OUT_OF_SERVICE_ATTRIBUTE_ID, true); } - public void moveToLevelWithOnOff(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - moveToLevelWithOnOff(callback, level, transitionTime, optionsMask, optionsOverride, 0); + public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { + writeOutOfServiceAttribute(callback, value, 0); } - public void moveToLevelWithOnOff(DefaultClusterCallback callback, Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - final long levelFieldID = 0L; - BaseTLVType leveltlvValue = new UIntType(level); - elements.add(new StructElement(levelFieldID, leveltlvValue)); - - final long transitionTimeFieldID = 1L; - BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - - final long optionsMaskFieldID = 2L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); - - final long optionsOverrideFieldID = 3L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { - moveWithOnOff(callback, moveMode, rate, optionsMask, optionsOverride, 0); - } - - public void moveWithOnOff(DefaultClusterCallback callback, Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 5L; - - ArrayList elements = new ArrayList<>(); - final long moveModeFieldID = 0L; - BaseTLVType moveModetlvValue = new UIntType(moveMode); - elements.add(new StructElement(moveModeFieldID, moveModetlvValue)); - - final long rateFieldID = 1L; - BaseTLVType ratetlvValue = rate != null ? new UIntType(rate) : new NullType(); - elements.add(new StructElement(rateFieldID, ratetlvValue)); - - final long optionsMaskFieldID = 2L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); - - final long optionsOverrideFieldID = 3L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void stepWithOnOff(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { - stepWithOnOff(callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, 0); + public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), OUT_OF_SERVICE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void stepWithOnOff(DefaultClusterCallback callback, Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 6L; - - ArrayList elements = new ArrayList<>(); - final long stepModeFieldID = 0L; - BaseTLVType stepModetlvValue = new UIntType(stepMode); - elements.add(new StructElement(stepModeFieldID, stepModetlvValue)); - - final long stepSizeFieldID = 1L; - BaseTLVType stepSizetlvValue = new UIntType(stepSize); - elements.add(new StructElement(stepSizeFieldID, stepSizetlvValue)); - - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = transitionTime != null ? new UIntType(transitionTime) : new NullType(); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - - final long optionsMaskFieldID = 3L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); - - final long optionsOverrideFieldID = 4L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + public void subscribeOutOfServiceAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void stopWithOnOff(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride) { - stopWithOnOff(callback, optionsMask, optionsOverride, 0); + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OUT_OF_SERVICE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void stopWithOnOff(DefaultClusterCallback callback, Integer optionsMask, Integer optionsOverride, int timedInvokeTimeoutMs) { - final long commandId = 7L; - - ArrayList elements = new ArrayList<>(); - final long optionsMaskFieldID = 0L; - BaseTLVType optionsMasktlvValue = new UIntType(optionsMask); - elements.add(new StructElement(optionsMaskFieldID, optionsMasktlvValue)); - - final long optionsOverrideFieldID = 1L; - BaseTLVType optionsOverridetlvValue = new UIntType(optionsOverride); - elements.add(new StructElement(optionsOverrideFieldID, optionsOverridetlvValue)); + public void readPolarityAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void moveToClosestFrequency(DefaultClusterCallback callback, Integer frequency) { - moveToClosestFrequency(callback, frequency, 0); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, POLARITY_ATTRIBUTE_ID, true); } - public void moveToClosestFrequency(DefaultClusterCallback callback, Integer frequency, int timedInvokeTimeoutMs) { - final long commandId = 8L; - - ArrayList elements = new ArrayList<>(); - final long frequencyFieldID = 0L; - BaseTLVType frequencytlvValue = new UIntType(frequency); - elements.add(new StructElement(frequencyFieldID, frequencytlvValue)); + public void subscribePolarityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface CurrentLevelAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnLevelAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnTransitionTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OffTransitionTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface DefaultMoveRateAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface StartUpCurrentLevelAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, POLARITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentLevelAttribute( - CurrentLevelAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); + public void readPresentValueAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_LEVEL_ATTRIBUTE_ID, true); + }, PRESENT_VALUE_ATTRIBUTE_ID, true); } - public void subscribeCurrentLevelAttribute( - CurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); + public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { + writePresentValueAttribute(callback, value, 0); + } + + public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), PRESENT_VALUE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePresentValueAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, PRESENT_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readRemainingTimeAttribute( + public void readReliabilityAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -3065,24 +2870,33 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REMAINING_TIME_ATTRIBUTE_ID, true); + }, RELIABILITY_ATTRIBUTE_ID, true); } - public void subscribeRemainingTimeAttribute( + public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value) { + writeReliabilityAttribute(callback, value, 0); + } + + public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), RELIABILITY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeReliabilityAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_TIME_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REMAINING_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, RELIABILITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinLevelAttribute( + public void readStatusFlagsAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_LEVEL_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -3090,395 +2904,269 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_LEVEL_ATTRIBUTE_ID, true); + }, STATUS_FLAGS_ATTRIBUTE_ID, true); } - public void subscribeMinLevelAttribute( + public void subscribeStatusFlagsAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_LEVEL_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, STATUS_FLAGS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxLevelAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_LEVEL_ATTRIBUTE_ID); + public void readApplicationTypeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_LEVEL_ATTRIBUTE_ID, true); + }, APPLICATION_TYPE_ATTRIBUTE_ID, true); } - public void subscribeMaxLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_LEVEL_ATTRIBUTE_ID); + public void subscribeApplicationTypeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, APPLICATION_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentFrequencyAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FREQUENCY_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_FREQUENCY_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeCurrentFrequencyAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FREQUENCY_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinFrequencyAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_FREQUENCY_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_FREQUENCY_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeMinFrequencyAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_FREQUENCY_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxFrequencyAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_FREQUENCY_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_FREQUENCY_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeMaxFrequencyAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_FREQUENCY_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOptionsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPTIONS_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPTIONS_ATTRIBUTE_ID, true); - } - - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { - writeOptionsAttribute(callback, value, 0); - } - - public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), OPTIONS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeOptionsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPTIONS_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPTIONS_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnOffTransitionTimeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, true); - } - - public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnOffTransitionTimeAttribute(callback, value, 0); - } - - public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeOnOffTransitionTimeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_OFF_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnLevelAttribute( - OnLevelAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_LEVEL_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_LEVEL_ATTRIBUTE_ID, true); - } - - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeOnLevelAttribute(callback, value, 0); - } - - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeOnLevelAttribute( - OnLevelAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_LEVEL_ATTRIBUTE_ID); + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readOnTransitionTimeAttribute( - OnTransitionTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TRANSITION_TIME_ATTRIBUTE_ID); + public static class PulseWidthModulationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 28L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_TRANSITION_TIME_ATTRIBUTE_ID, true); + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public PulseWidthModulationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); } - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnTransitionTimeAttribute(callback, value, 0); + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; } - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeOnTransitionTimeAttribute( - OnTransitionTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_TRANSITION_TIME_ATTRIBUTE_ID); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ON_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readOffTransitionTimeAttribute( - OffTransitionTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_TRANSITION_TIME_ATTRIBUTE_ID); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OFF_TRANSITION_TIME_ATTRIBUTE_ID, true); - } - - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { - writeOffTransitionTimeAttribute(callback, value, 0); - } - - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), OFF_TRANSITION_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeOffTransitionTimeAttribute( - OffTransitionTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OFF_TRANSITION_TIME_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OFF_TRANSITION_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDefaultMoveRateAttribute( - DefaultMoveRateAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_MOVE_RATE_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEFAULT_MOVE_RATE_ATTRIBUTE_ID, true); - } - - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { - writeDefaultMoveRateAttribute(callback, value, 0); - } - - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_MOVE_RATE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeDefaultMoveRateAttribute( - DefaultMoveRateAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_MOVE_RATE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, DEFAULT_MOVE_RATE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStartUpCurrentLevelAttribute( - StartUpCurrentLevelAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, true); - } - - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpCurrentLevelAttribute(callback, value, 0); - } - - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeStartUpCurrentLevelAttribute( - StartUpCurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } public void subscribeAcceptedCommandListAttribute( @@ -3594,18 +3282,14 @@ public void onSuccess(byte[] tlv) { } } - public static class BinaryInputBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 15L; + public static class DescriptorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 29L; - private static final long ACTIVE_TEXT_ATTRIBUTE_ID = 4L; - private static final long DESCRIPTION_ATTRIBUTE_ID = 28L; - private static final long INACTIVE_TEXT_ATTRIBUTE_ID = 46L; - private static final long OUT_OF_SERVICE_ATTRIBUTE_ID = 81L; - private static final long POLARITY_ATTRIBUTE_ID = 84L; - private static final long PRESENT_VALUE_ATTRIBUTE_ID = 85L; - private static final long RELIABILITY_ATTRIBUTE_ID = 103L; - private static final long STATUS_FLAGS_ATTRIBUTE_ID = 111L; - private static final long APPLICATION_TYPE_ATTRIBUTE_ID = 256L; + private static final long DEVICE_TYPE_LIST_ATTRIBUTE_ID = 0L; + private static final long SERVER_LIST_ATTRIBUTE_ID = 1L; + private static final long CLIENT_LIST_ATTRIBUTE_ID = 2L; + private static final long PARTS_LIST_ATTRIBUTE_ID = 3L; + private static final long TAG_LIST_ATTRIBUTE_ID = 4L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -3613,7 +3297,7 @@ public static class BinaryInputBasicCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public BinaryInputBasicCluster(long devicePtr, int endpointId) { + public DescriptorCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -3623,6 +3307,26 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public interface DeviceTypeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ServerListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ClientListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface PartsListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface TagListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -3639,283 +3343,129 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readActiveTextAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); + public void readDeviceTypeListAttribute( + DeviceTypeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_TYPE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTIVE_TEXT_ATTRIBUTE_ID, true); - } - - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value) { - writeActiveTextAttribute(callback, value, 0); - } - - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, DEVICE_TYPE_LIST_ATTRIBUTE_ID, true); } - public void subscribeActiveTextAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); + public void subscribeDeviceTypeListAttribute( + DeviceTypeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_TYPE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); + }, DEVICE_TYPE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDescriptionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + public void readServerListAttribute( + ServerListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERVER_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DESCRIPTION_ATTRIBUTE_ID, true); - } - - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value) { - writeDescriptionAttribute(callback, value, 0); - } - - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), DESCRIPTION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, SERVER_LIST_ATTRIBUTE_ID, true); } - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + public void subscribeServerListAttribute( + ServerListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERVER_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, SERVER_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInactiveTextAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); + public void readClientListAttribute( + ClientListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLIENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, INACTIVE_TEXT_ATTRIBUTE_ID, true); - } - - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value) { - writeInactiveTextAttribute(callback, value, 0); - } - - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), INACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CLIENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeInactiveTextAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); + public void subscribeClientListAttribute( + ClientListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLIENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, INACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLIENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOutOfServiceAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); + public void readPartsListAttribute( + PartsListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PARTS_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OUT_OF_SERVICE_ATTRIBUTE_ID, true); - } - - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { - writeOutOfServiceAttribute(callback, value, 0); - } - - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), OUT_OF_SERVICE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, PARTS_LIST_ATTRIBUTE_ID, true); } - public void subscribeOutOfServiceAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); + public void subscribePartsListAttribute( + PartsListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PARTS_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OUT_OF_SERVICE_ATTRIBUTE_ID, minInterval, maxInterval); + }, PARTS_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPolarityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); + public void readTagListAttribute( + TagListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TAG_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POLARITY_ATTRIBUTE_ID, true); - } - - public void subscribePolarityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, POLARITY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPresentValueAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PRESENT_VALUE_ATTRIBUTE_ID, true); - } - - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { - writePresentValueAttribute(callback, value, 0); - } - - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), PRESENT_VALUE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribePresentValueAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, PRESENT_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReliabilityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RELIABILITY_ATTRIBUTE_ID, true); - } - - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value) { - writeReliabilityAttribute(callback, value, 0); - } - - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RELIABILITY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeReliabilityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, RELIABILITY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStatusFlagsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, STATUS_FLAGS_ATTRIBUTE_ID, true); - } - - public void subscribeStatusFlagsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, STATUS_FLAGS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readApplicationTypeAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPLICATION_TYPE_ATTRIBUTE_ID, true); + }, TAG_LIST_ATTRIBUTE_ID, true); } - public void subscribeApplicationTypeAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); + public void subscribeTagListAttribute( + TagListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TAG_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, APPLICATION_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + }, TAG_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -4069,9 +3619,10 @@ public void onSuccess(byte[] tlv) { } } - public static class PulseWidthModulationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 28L; + public static class BindingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 30L; + private static final long BINDING_ATTRIBUTE_ID = 0L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -4079,7 +3630,7 @@ public static class PulseWidthModulationCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public PulseWidthModulationCluster(long devicePtr, int endpointId) { + public BindingCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -4089,6 +3640,10 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public interface BindingAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -4105,6 +3660,45 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } + public void readBindingAttribute( + BindingAttributeCallback callback) { + readBindingAttributeWithFabricFilter(callback, true); + } + + public void readBindingAttributeWithFabricFilter( + BindingAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BINDING_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BINDING_ATTRIBUTE_ID, isFabricFiltered); + } + + public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { + writeBindingAttribute(callback, value, 0); + } + + public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), BINDING_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeBindingAttribute( + BindingAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BINDING_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, BINDING_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -4256,14 +3850,14 @@ public void onSuccess(byte[] tlv) { } } - public static class DescriptorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 29L; + public static class AccessControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 31L; - private static final long DEVICE_TYPE_LIST_ATTRIBUTE_ID = 0L; - private static final long SERVER_LIST_ATTRIBUTE_ID = 1L; - private static final long CLIENT_LIST_ATTRIBUTE_ID = 2L; - private static final long PARTS_LIST_ATTRIBUTE_ID = 3L; - private static final long TAG_LIST_ATTRIBUTE_ID = 4L; + private static final long ACL_ATTRIBUTE_ID = 0L; + private static final long EXTENSION_ATTRIBUTE_ID = 1L; + private static final long SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID = 2L; + private static final long TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID = 3L; + private static final long ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID = 4L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -4271,7 +3865,7 @@ public static class DescriptorCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public DescriptorCluster(long devicePtr, int endpointId) { + public AccessControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -4281,24 +3875,12 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface DeviceTypeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface ServerListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface ClientListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface PartsListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface AclAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public interface TagListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface ExtensionAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -4317,129 +3899,157 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readDeviceTypeListAttribute( - DeviceTypeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_TYPE_LIST_ATTRIBUTE_ID); + public void readAclAttribute( + AclAttributeCallback callback) { + readAclAttributeWithFabricFilter(callback, true); + } + + public void readAclAttributeWithFabricFilter( + AclAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEVICE_TYPE_LIST_ATTRIBUTE_ID, true); + }, ACL_ATTRIBUTE_ID, isFabricFiltered); } - public void subscribeDeviceTypeListAttribute( - DeviceTypeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_TYPE_LIST_ATTRIBUTE_ID); + public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { + writeAclAttribute(callback, value, 0); + } + + public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), ACL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeAclAttribute( + AclAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEVICE_TYPE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readServerListAttribute( - ServerListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERVER_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override + public void readExtensionAttribute( + ExtensionAttributeCallback callback) { + readExtensionAttributeWithFabricFilter(callback, true); + } + + public void readExtensionAttributeWithFabricFilter( + ExtensionAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXTENSION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SERVER_LIST_ATTRIBUTE_ID, true); + }, EXTENSION_ATTRIBUTE_ID, isFabricFiltered); } - public void subscribeServerListAttribute( - ServerListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERVER_LIST_ATTRIBUTE_ID); + public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { + writeExtensionAttribute(callback, value, 0); + } + + public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), EXTENSION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeExtensionAttribute( + ExtensionAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXTENSION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SERVER_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, EXTENSION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClientListAttribute( - ClientListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLIENT_LIST_ATTRIBUTE_ID); + public void readSubjectsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLIENT_LIST_ATTRIBUTE_ID, true); + }, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, true); } - public void subscribeClientListAttribute( - ClientListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLIENT_LIST_ATTRIBUTE_ID); + public void subscribeSubjectsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLIENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPartsListAttribute( - PartsListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PARTS_LIST_ATTRIBUTE_ID); + public void readTargetsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PARTS_LIST_ATTRIBUTE_ID, true); + }, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, true); } - public void subscribePartsListAttribute( - PartsListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PARTS_LIST_ATTRIBUTE_ID); + public void subscribeTargetsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PARTS_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readTagListAttribute( - TagListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TAG_LIST_ATTRIBUTE_ID); + public void readAccessControlEntriesPerFabricAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TAG_LIST_ATTRIBUTE_ID, true); + }, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID, true); } - public void subscribeTagListAttribute( - TagListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TAG_LIST_ATTRIBUTE_ID); + public void subscribeAccessControlEntriesPerFabricAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TAG_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -4593,10 +4203,12 @@ public void onSuccess(byte[] tlv) { } } - public static class BindingCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 30L; + public static class ActionsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 37L; - private static final long BINDING_ATTRIBUTE_ID = 0L; + private static final long ACTION_LIST_ATTRIBUTE_ID = 0L; + private static final long ENDPOINT_LISTS_ATTRIBUTE_ID = 1L; + private static final long SETUP_U_R_L_ATTRIBUTE_ID = 2L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -4604,7 +4216,7 @@ public static class BindingCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public BindingCluster(long devicePtr, int endpointId) { + public ActionsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -4614,416 +4226,411 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface BindingAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void instantAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + instantAction(callback, actionID, invokeID, 0); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void instantAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 0L; - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readBindingAttribute( - BindingAttributeCallback callback) { - readBindingAttributeWithFabricFilter(callback, true); + public void instantActionWithTransition(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Integer transitionTime) { + instantActionWithTransition(callback, actionID, invokeID, transitionTime, 0); } - public void readBindingAttributeWithFabricFilter( - BindingAttributeCallback callback, boolean isFabricFiltered) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BINDING_ATTRIBUTE_ID); + public void instantActionWithTransition(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Integer transitionTime, int timedInvokeTimeoutMs) { + final long commandId = 1L; - readAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BINDING_ATTRIBUTE_ID, isFabricFiltered); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { - writeBindingAttribute(callback, value, 0); + public void startAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + startAction(callback, actionID, invokeID, 0); } - public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); - writeAttribute(new WriteAttributesCallbackImpl(callback), BINDING_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } + public void startAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 2L; - public void subscribeBindingAttribute( - BindingAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BINDING_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BINDING_ATTRIBUTE_ID, minInterval, maxInterval); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + public void startActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { + startActionWithDuration(callback, actionID, invokeID, duration, 0); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void startActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 3L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + final long durationFieldID = 2L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void stopAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + stopAction(callback, actionID, invokeID, 0); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } + public void stopAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 4L; - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, EVENT_LIST_ATTRIBUTE_ID, true); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + public void pauseAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + pauseAction(callback, actionID, invokeID, 0); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void pauseAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 5L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); - } + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + public void pauseActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { + pauseActionWithDuration(callback, actionID, invokeID, duration, 0); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void pauseActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 6L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); - } + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + final long durationFieldID = 2L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + public void resumeAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + resumeAction(callback, actionID, invokeID, 0); } - } - public static class AccessControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 31L; + public void resumeAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 7L; - private static final long ACL_ATTRIBUTE_ID = 0L; - private static final long EXTENSION_ATTRIBUTE_ID = 1L; - private static final long SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID = 2L; - private static final long TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID = 3L; - private static final long ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID = 4L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public AccessControlCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public interface AclAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void enableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + enableAction(callback, actionID, invokeID, 0); } - public interface ExtensionAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void enableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 8L; - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void enableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { + enableActionWithDuration(callback, actionID, invokeID, duration, 0); } - public void readAclAttribute( - AclAttributeCallback callback) { - readAclAttributeWithFabricFilter(callback, true); - } + public void enableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 9L; - public void readAclAttributeWithFabricFilter( - AclAttributeCallback callback, boolean isFabricFiltered) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACL_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + final long durationFieldID = 2L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACL_ATTRIBUTE_ID, isFabricFiltered); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { - writeAclAttribute(callback, value, 0); + public void disableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { + disableAction(callback, actionID, invokeID, 0); } - public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } + public void disableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + final long commandId = 10L; - public void subscribeAclAttribute( - AclAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACL_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACL_ATTRIBUTE_ID, minInterval, maxInterval); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readExtensionAttribute( - ExtensionAttributeCallback callback) { - readExtensionAttributeWithFabricFilter(callback, true); + public void disableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { + disableActionWithDuration(callback, actionID, invokeID, duration, 0); } - public void readExtensionAttributeWithFabricFilter( - ExtensionAttributeCallback callback, boolean isFabricFiltered) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXTENSION_ATTRIBUTE_ID); + public void disableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { + final long commandId = 11L; - readAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long actionIDFieldID = 0L; + BaseTLVType actionIDtlvValue = new UIntType(actionID); + elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + + final long invokeIDFieldID = 1L; + BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); + elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + + final long durationFieldID = 2L; + BaseTLVType durationtlvValue = new UIntType(duration); + elements.add(new StructElement(durationFieldID, durationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, EXTENSION_ATTRIBUTE_ID, isFabricFiltered); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { - writeExtensionAttribute(callback, value, 0); + public interface ActionListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); - writeAttribute(new WriteAttributesCallbackImpl(callback), EXTENSION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public interface EndpointListsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeExtensionAttribute( - ExtensionAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXTENSION_ATTRIBUTE_ID); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, EXTENSION_ATTRIBUTE_ID, minInterval, maxInterval); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readSubjectsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readActionListAttribute( + ActionListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTION_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, true); + }, ACTION_LIST_ATTRIBUTE_ID, true); } - public void subscribeSubjectsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); + public void subscribeActionListAttribute( + ActionListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTION_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUBJECTS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTION_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readTargetsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); + public void readEndpointListsAttribute( + EndpointListsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LISTS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, true); + }, ENDPOINT_LISTS_ATTRIBUTE_ID, true); } - public void subscribeTargetsPerAccessControlEntryAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID); + public void subscribeEndpointListsAttribute( + EndpointListsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LISTS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TARGETS_PER_ACCESS_CONTROL_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval); + }, ENDPOINT_LISTS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAccessControlEntriesPerFabricAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID); + public void readSetupURLAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETUP_U_R_L_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID, true); + }, SETUP_U_R_L_ATTRIBUTE_ID, true); } - public void subscribeAccessControlEntriesPerFabricAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID); + public void subscribeSetupURLAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETUP_U_R_L_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCESS_CONTROL_ENTRIES_PER_FABRIC_ATTRIBUTE_ID, minInterval, maxInterval); + }, SETUP_U_R_L_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -5177,12 +4784,32 @@ public void onSuccess(byte[] tlv) { } } - public static class ActionsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 37L; + public static class BasicInformationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 40L; - private static final long ACTION_LIST_ATTRIBUTE_ID = 0L; - private static final long ENDPOINT_LISTS_ATTRIBUTE_ID = 1L; - private static final long SETUP_U_R_L_ATTRIBUTE_ID = 2L; + private static final long DATA_MODEL_REVISION_ATTRIBUTE_ID = 0L; + private static final long VENDOR_NAME_ATTRIBUTE_ID = 1L; + private static final long VENDOR_I_D_ATTRIBUTE_ID = 2L; + private static final long PRODUCT_NAME_ATTRIBUTE_ID = 3L; + private static final long PRODUCT_I_D_ATTRIBUTE_ID = 4L; + private static final long NODE_LABEL_ATTRIBUTE_ID = 5L; + private static final long LOCATION_ATTRIBUTE_ID = 6L; + private static final long HARDWARE_VERSION_ATTRIBUTE_ID = 7L; + private static final long HARDWARE_VERSION_STRING_ATTRIBUTE_ID = 8L; + private static final long SOFTWARE_VERSION_ATTRIBUTE_ID = 9L; + private static final long SOFTWARE_VERSION_STRING_ATTRIBUTE_ID = 10L; + private static final long MANUFACTURING_DATE_ATTRIBUTE_ID = 11L; + private static final long PART_NUMBER_ATTRIBUTE_ID = 12L; + private static final long PRODUCT_U_R_L_ATTRIBUTE_ID = 13L; + private static final long PRODUCT_LABEL_ATTRIBUTE_ID = 14L; + private static final long SERIAL_NUMBER_ATTRIBUTE_ID = 15L; + private static final long LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID = 16L; + private static final long REACHABLE_ATTRIBUTE_ID = 17L; + private static final long UNIQUE_I_D_ATTRIBUTE_ID = 18L; + private static final long CAPABILITY_MINIMA_ATTRIBUTE_ID = 19L; + private static final long PRODUCT_APPEARANCE_ATTRIBUTE_ID = 20L; + private static final long SPECIFICATION_VERSION_ATTRIBUTE_ID = 21L; + private static final long MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID = 22L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -5190,7 +4817,7 @@ public static class ActionsCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ActionsCluster(long devicePtr, int endpointId) { + public BasicInformationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -5200,22 +4827,14 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void instantAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - instantAction(callback, actionID, invokeID, 0); + public void mfgSpecificPing(DefaultClusterCallback callback) { + mfgSpecificPing(callback, 0); } - public void instantAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { + public void mfgSpecificPing(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -5224,367 +4843,326 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void instantActionWithTransition(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Integer transitionTime) { - instantActionWithTransition(callback, actionID, invokeID, transitionTime, 0); + public interface CapabilityMinimaAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.BasicInformationClusterCapabilityMinimaStruct value); } - public void instantActionWithTransition(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Integer transitionTime, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + public interface ProductAppearanceAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.BasicInformationClusterProductAppearanceStruct value); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long transitionTimeFieldID = 2L; - BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); - elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void startAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - startAction(callback, actionID, invokeID, 0); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void startAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 2L; + public void readDataModelRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DATA_MODEL_REVISION_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DATA_MODEL_REVISION_ATTRIBUTE_ID, true); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void subscribeDataModelRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DATA_MODEL_REVISION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DATA_MODEL_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void startActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - startActionWithDuration(callback, actionID, invokeID, duration, 0); - } + public void readVendorNameAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); - public void startActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { - final long commandId = 3L; + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VENDOR_NAME_ATTRIBUTE_ID, true); + } - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + public void subscribeVendorNameAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VENDOR_NAME_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long durationFieldID = 2L; - BaseTLVType durationtlvValue = new UIntType(duration); - elements.add(new StructElement(durationFieldID, durationtlvValue)); + public void readVendorIDAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VENDOR_I_D_ATTRIBUTE_ID, true); } - public void stopAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - stopAction(callback, actionID, invokeID, 0); + public void subscribeVendorIDAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, VENDOR_I_D_ATTRIBUTE_ID, minInterval, maxInterval); } - public void stopAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 4L; + public void readProductNameAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_NAME_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRODUCT_NAME_ATTRIBUTE_ID, true); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void subscribeProductNameAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_NAME_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRODUCT_NAME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void pauseAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - pauseAction(callback, actionID, invokeID, 0); + public void readProductIDAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRODUCT_I_D_ATTRIBUTE_ID, true); } - public void pauseAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 5L; + public void subscribeProductIDAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRODUCT_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void readNodeLabelAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NODE_LABEL_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NODE_LABEL_ATTRIBUTE_ID, true); } - public void pauseActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - pauseActionWithDuration(callback, actionID, invokeID, duration, 0); + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { + writeNodeLabelAttribute(callback, value, 0); } - public void pauseActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { - final long commandId = 6L; + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), NODE_LABEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + public void subscribeNodeLabelAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NODE_LABEL_ATTRIBUTE_ID); - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NODE_LABEL_ATTRIBUTE_ID, minInterval, maxInterval); + } - final long durationFieldID = 2L; - BaseTLVType durationtlvValue = new UIntType(duration); - elements.add(new StructElement(durationFieldID, durationtlvValue)); + public void readLocationAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOCATION_ATTRIBUTE_ID, true); } - public void resumeAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - resumeAction(callback, actionID, invokeID, 0); + public void writeLocationAttribute(DefaultClusterCallback callback, String value) { + writeLocationAttribute(callback, value, 0); } - public void resumeAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 7L; - - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + public void writeLocationAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), LOCATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void subscribeLocationAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void enableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - enableAction(callback, actionID, invokeID, 0); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, LOCATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void enableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 8L; + public void readHardwareVersionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_ATTRIBUTE_ID); - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HARDWARE_VERSION_ATTRIBUTE_ID, true); + } - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void subscribeHardwareVersionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, HARDWARE_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void enableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - enableActionWithDuration(callback, actionID, invokeID, duration, 0); - } - - public void enableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { - final long commandId = 9L; - - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - - final long durationFieldID = 2L; - BaseTLVType durationtlvValue = new UIntType(duration); - elements.add(new StructElement(durationFieldID, durationtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void disableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID) { - disableAction(callback, actionID, invokeID, 0); - } - - public void disableAction(DefaultClusterCallback callback, Integer actionID, Optional invokeID, int timedInvokeTimeoutMs) { - final long commandId = 10L; - - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); + public void readHardwareVersionStringAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_STRING_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void disableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration) { - disableActionWithDuration(callback, actionID, invokeID, duration, 0); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HARDWARE_VERSION_STRING_ATTRIBUTE_ID, true); } - public void disableActionWithDuration(DefaultClusterCallback callback, Integer actionID, Optional invokeID, Long duration, int timedInvokeTimeoutMs) { - final long commandId = 11L; - - ArrayList elements = new ArrayList<>(); - final long actionIDFieldID = 0L; - BaseTLVType actionIDtlvValue = new UIntType(actionID); - elements.add(new StructElement(actionIDFieldID, actionIDtlvValue)); - - final long invokeIDFieldID = 1L; - BaseTLVType invokeIDtlvValue = invokeID.map((nonOptionalinvokeID) -> new UIntType(nonOptionalinvokeID)).orElse(new EmptyType()); - elements.add(new StructElement(invokeIDFieldID, invokeIDtlvValue)); - - final long durationFieldID = 2L; - BaseTLVType durationtlvValue = new UIntType(duration); - elements.add(new StructElement(durationFieldID, durationtlvValue)); + public void subscribeHardwareVersionStringAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_STRING_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ActionListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EndpointListsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, HARDWARE_VERSION_STRING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readActionListAttribute( - ActionListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTION_LIST_ATTRIBUTE_ID); + public void readSoftwareVersionAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTION_LIST_ATTRIBUTE_ID, true); + }, SOFTWARE_VERSION_ATTRIBUTE_ID, true); } - public void subscribeActionListAttribute( - ActionListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTION_LIST_ATTRIBUTE_ID); + public void subscribeSoftwareVersionAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACTION_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SOFTWARE_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEndpointListsAttribute( - EndpointListsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LISTS_ATTRIBUTE_ID); + public void readSoftwareVersionStringAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ENDPOINT_LISTS_ATTRIBUTE_ID, true); + }, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, true); } - public void subscribeEndpointListsAttribute( - EndpointListsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LISTS_ATTRIBUTE_ID); + public void subscribeSoftwareVersionStringAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ENDPOINT_LISTS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSetupURLAttribute( + public void readManufacturingDateAttribute( CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETUP_U_R_L_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MANUFACTURING_DATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -5592,358 +5170,283 @@ public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SETUP_U_R_L_ATTRIBUTE_ID, true); + }, MANUFACTURING_DATE_ATTRIBUTE_ID, true); } - public void subscribeSetupURLAttribute( + public void subscribeManufacturingDateAttribute( CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETUP_U_R_L_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MANUFACTURING_DATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SETUP_U_R_L_ATTRIBUTE_ID, minInterval, maxInterval); + }, MANUFACTURING_DATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readPartNumberAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PART_NUMBER_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, PART_NUMBER_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribePartNumberAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PART_NUMBER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, PART_NUMBER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readProductURLAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_U_R_L_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, PRODUCT_U_R_L_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeProductURLAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_U_R_L_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, PRODUCT_U_R_L_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readProductLabelAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_LABEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, PRODUCT_LABEL_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeProductLabelAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_LABEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, PRODUCT_LABEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readSerialNumberAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERIAL_NUMBER_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, SERIAL_NUMBER_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeSerialNumberAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERIAL_NUMBER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SERIAL_NUMBER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readLocalConfigDisabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - + public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeLocalConfigDisabledAttribute(callback, value, 0); + } + + public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLocalConfigDisabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID); + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void readReachableAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACHABLE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, REACHABLE_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void subscribeReachableAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACHABLE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class BasicInformationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 40L; - - private static final long DATA_MODEL_REVISION_ATTRIBUTE_ID = 0L; - private static final long VENDOR_NAME_ATTRIBUTE_ID = 1L; - private static final long VENDOR_I_D_ATTRIBUTE_ID = 2L; - private static final long PRODUCT_NAME_ATTRIBUTE_ID = 3L; - private static final long PRODUCT_I_D_ATTRIBUTE_ID = 4L; - private static final long NODE_LABEL_ATTRIBUTE_ID = 5L; - private static final long LOCATION_ATTRIBUTE_ID = 6L; - private static final long HARDWARE_VERSION_ATTRIBUTE_ID = 7L; - private static final long HARDWARE_VERSION_STRING_ATTRIBUTE_ID = 8L; - private static final long SOFTWARE_VERSION_ATTRIBUTE_ID = 9L; - private static final long SOFTWARE_VERSION_STRING_ATTRIBUTE_ID = 10L; - private static final long MANUFACTURING_DATE_ATTRIBUTE_ID = 11L; - private static final long PART_NUMBER_ATTRIBUTE_ID = 12L; - private static final long PRODUCT_U_R_L_ATTRIBUTE_ID = 13L; - private static final long PRODUCT_LABEL_ATTRIBUTE_ID = 14L; - private static final long SERIAL_NUMBER_ATTRIBUTE_ID = 15L; - private static final long LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID = 16L; - private static final long REACHABLE_ATTRIBUTE_ID = 17L; - private static final long UNIQUE_I_D_ATTRIBUTE_ID = 18L; - private static final long CAPABILITY_MINIMA_ATTRIBUTE_ID = 19L; - private static final long PRODUCT_APPEARANCE_ATTRIBUTE_ID = 20L; - private static final long SPECIFICATION_VERSION_ATTRIBUTE_ID = 21L; - private static final long MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID = 22L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public BasicInformationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void mfgSpecificPing(DefaultClusterCallback callback) { - mfgSpecificPing(callback, 0); - } - - public void mfgSpecificPing(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface CapabilityMinimaAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.BasicInformationClusterCapabilityMinimaStruct value); - } - - public interface ProductAppearanceAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.BasicInformationClusterProductAppearanceStruct value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + }, REACHABLE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDataModelRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DATA_MODEL_REVISION_ATTRIBUTE_ID); + public void readUniqueIDAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNIQUE_I_D_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DATA_MODEL_REVISION_ATTRIBUTE_ID, true); + }, UNIQUE_I_D_ATTRIBUTE_ID, true); } - public void subscribeDataModelRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DATA_MODEL_REVISION_ATTRIBUTE_ID); + public void subscribeUniqueIDAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNIQUE_I_D_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DATA_MODEL_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + }, UNIQUE_I_D_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readVendorNameAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); + public void readCapabilityMinimaAttribute( + CapabilityMinimaAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CAPABILITY_MINIMA_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.BasicInformationClusterCapabilityMinimaStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, VENDOR_NAME_ATTRIBUTE_ID, true); + }, CAPABILITY_MINIMA_ATTRIBUTE_ID, true); } - public void subscribeVendorNameAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_NAME_ATTRIBUTE_ID); + public void subscribeCapabilityMinimaAttribute( + CapabilityMinimaAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CAPABILITY_MINIMA_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.BasicInformationClusterCapabilityMinimaStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, VENDOR_NAME_ATTRIBUTE_ID, minInterval, maxInterval); + }, CAPABILITY_MINIMA_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readVendorIDAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + public void readProductAppearanceAttribute( + ProductAppearanceAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_APPEARANCE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.BasicInformationClusterProductAppearanceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, VENDOR_I_D_ATTRIBUTE_ID, true); + }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, true); } - public void subscribeVendorIDAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VENDOR_I_D_ATTRIBUTE_ID); + public void subscribeProductAppearanceAttribute( + ProductAppearanceAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_APPEARANCE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.BasicInformationClusterProductAppearanceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, VENDOR_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readProductNameAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_NAME_ATTRIBUTE_ID); + public void readSpecificationVersionAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PRODUCT_NAME_ATTRIBUTE_ID, true); + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, true); } - public void subscribeProductNameAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_NAME_ATTRIBUTE_ID); + public void subscribeSpecificationVersionAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PRODUCT_NAME_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readProductIDAttribute( + public void readMaxPathsPerInvokeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -5951,142 +5454,124 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PRODUCT_I_D_ATTRIBUTE_ID, true); + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, true); } - public void subscribeProductIDAttribute( + public void subscribeMaxPathsPerInvokeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_I_D_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PRODUCT_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNodeLabelAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NODE_LABEL_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, NODE_LABEL_ATTRIBUTE_ID, true); - } - - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { - writeNodeLabelAttribute(callback, value, 0); - } - - public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), NODE_LABEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeNodeLabelAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NODE_LABEL_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, NODE_LABEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLocationAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LOCATION_ATTRIBUTE_ID, true); - } - - public void writeLocationAttribute(DefaultClusterCallback callback, String value) { - writeLocationAttribute(callback, value, 0); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void writeLocationAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), LOCATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeLocationAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LOCATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readHardwareVersionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, HARDWARE_VERSION_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeHardwareVersionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, HARDWARE_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readHardwareVersionStringAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_STRING_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, HARDWARE_VERSION_STRING_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeHardwareVersionStringAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_VERSION_STRING_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, HARDWARE_VERSION_STRING_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSoftwareVersionAttribute( + public void readFeatureMapAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -6094,308 +5579,366 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SOFTWARE_VERSION_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeSoftwareVersionAttribute( + public void subscribeFeatureMapAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SOFTWARE_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSoftwareVersionStringAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, true); - } - - public void subscribeSoftwareVersionStringAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SOFTWARE_VERSION_STRING_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readManufacturingDateAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MANUFACTURING_DATE_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MANUFACTURING_DATE_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeManufacturingDateAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MANUFACTURING_DATE_ATTRIBUTE_ID); + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MANUFACTURING_DATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readPartNumberAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PART_NUMBER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PART_NUMBER_ATTRIBUTE_ID, true); - } + public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 41L; - public void subscribePartNumberAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PART_NUMBER_ATTRIBUTE_ID); + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, PART_NUMBER_ATTRIBUTE_ID, minInterval, maxInterval); + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); } - public void readProductURLAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_U_R_L_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PRODUCT_U_R_L_ATTRIBUTE_ID, true); + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; } - public void subscribeProductURLAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_U_R_L_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, PRODUCT_U_R_L_ATTRIBUTE_ID, minInterval, maxInterval); + public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { + queryImage(callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, 0); } - public void readProductLabelAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_LABEL_ATTRIBUTE_ID); + public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider, int timedInvokeTimeoutMs) { + final long commandId = 0L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PRODUCT_LABEL_ATTRIBUTE_ID, true); - } + ArrayList elements = new ArrayList<>(); + final long vendorIDFieldID = 0L; + BaseTLVType vendorIDtlvValue = new UIntType(vendorID); + elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); - public void subscribeProductLabelAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_LABEL_ATTRIBUTE_ID); + final long productIDFieldID = 1L; + BaseTLVType productIDtlvValue = new UIntType(productID); + elements.add(new StructElement(productIDFieldID, productIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, PRODUCT_LABEL_ATTRIBUTE_ID, minInterval, maxInterval); - } + final long softwareVersionFieldID = 2L; + BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); + elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); - public void readSerialNumberAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERIAL_NUMBER_ATTRIBUTE_ID); + final long protocolsSupportedFieldID = 3L; + BaseTLVType protocolsSupportedtlvValue = ArrayType.generateArrayType(protocolsSupported, (elementprotocolsSupported) -> new UIntType(elementprotocolsSupported)); + elements.add(new StructElement(protocolsSupportedFieldID, protocolsSupportedtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SERIAL_NUMBER_ATTRIBUTE_ID, true); - } + final long hardwareVersionFieldID = 4L; + BaseTLVType hardwareVersiontlvValue = hardwareVersion.map((nonOptionalhardwareVersion) -> new UIntType(nonOptionalhardwareVersion)).orElse(new EmptyType()); + elements.add(new StructElement(hardwareVersionFieldID, hardwareVersiontlvValue)); - public void subscribeSerialNumberAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SERIAL_NUMBER_ATTRIBUTE_ID); + final long locationFieldID = 5L; + BaseTLVType locationtlvValue = location.map((nonOptionallocation) -> new StringType(nonOptionallocation)).orElse(new EmptyType()); + elements.add(new StructElement(locationFieldID, locationtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SERIAL_NUMBER_ATTRIBUTE_ID, minInterval, maxInterval); - } + final long requestorCanConsentFieldID = 6L; + BaseTLVType requestorCanConsenttlvValue = requestorCanConsent.map((nonOptionalrequestorCanConsent) -> new BooleanType(nonOptionalrequestorCanConsent)).orElse(new EmptyType()); + elements.add(new StructElement(requestorCanConsentFieldID, requestorCanConsenttlvValue)); - public void readLocalConfigDisabledAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID); + final long metadataForProviderFieldID = 7L; + BaseTLVType metadataForProvidertlvValue = metadataForProvider.map((nonOptionalmetadataForProvider) -> new ByteArrayType(nonOptionalmetadataForProvider)).orElse(new EmptyType()); + elements.add(new StructElement(metadataForProviderFieldID, metadataForProvidertlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, true); - } - - public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeLocalConfigDisabledAttribute(callback, value, 0); - } + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long delayedActionTimeFieldID = 1L; + Optional delayedActionTime = Optional.empty(); + final long imageURIFieldID = 2L; + Optional imageURI = Optional.empty(); + final long softwareVersionFieldID = 3L; + Optional softwareVersion = Optional.empty(); + final long softwareVersionStringFieldID = 4L; + Optional softwareVersionString = Optional.empty(); + final long updateTokenFieldID = 5L; + Optional updateToken = Optional.empty(); + final long userConsentNeededFieldID = 6L; + Optional userConsentNeeded = Optional.empty(); + final long metadataForRequestorFieldID = 7L; + Optional metadataForRequestor = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == delayedActionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + delayedActionTime = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == imageURIFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + imageURI = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == softwareVersionFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + softwareVersion = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == softwareVersionStringFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + softwareVersionString = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == updateTokenFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + updateToken = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == userConsentNeededFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + userConsentNeeded = Optional.of(castingValue.value(Boolean.class)); + } + } else if (element.contextTagNum() == metadataForRequestorFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + metadataForRequestor = Optional.of(castingValue.value(byte[].class)); + } + } + } + callback.onSuccess(status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, updateToken, userConsentNeeded, metadataForRequestor); + }}, commandId, value, timedInvokeTimeoutMs); + } - public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { + applyUpdateRequest(callback, updateToken, newVersion, 0); } - public void subscribeLocalConfigDisabledAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID); + public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion, int timedInvokeTimeoutMs) { + final long commandId = 2L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long updateTokenFieldID = 0L; + BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); + elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); + + final long newVersionFieldID = 1L; + BaseTLVType newVersiontlvValue = new UIntType(newVersion); + elements.add(new StructElement(newVersionFieldID, newVersiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + public void onResponse(StructType invokeStructValue) { + final long actionFieldID = 0L; + Integer action = null; + final long delayedActionTimeFieldID = 1L; + Long delayedActionTime = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == actionFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + action = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == delayedActionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + delayedActionTime = castingValue.value(Long.class); + } + } } - }, LOCAL_CONFIG_DISABLED_ATTRIBUTE_ID, minInterval, maxInterval); + callback.onSuccess(action, delayedActionTime); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readReachableAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACHABLE_ATTRIBUTE_ID); + public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { + notifyUpdateApplied(callback, updateToken, softwareVersion, 0); + } + + public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + final long updateTokenFieldID = 0L; + BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); + elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); + + final long softwareVersionFieldID = 1L; + BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); + elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface QueryImageResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); + } + + public interface ApplyUpdateResponseCallback extends BaseClusterCallback { + void onSuccess(Integer action, Long delayedActionTime); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REACHABLE_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeReachableAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACHABLE_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REACHABLE_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUniqueIDAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNIQUE_I_D_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, UNIQUE_I_D_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeUniqueIDAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UNIQUE_I_D_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, UNIQUE_I_D_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCapabilityMinimaAttribute( - CapabilityMinimaAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CAPABILITY_MINIMA_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.BasicInformationClusterCapabilityMinimaStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CAPABILITY_MINIMA_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeCapabilityMinimaAttribute( - CapabilityMinimaAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CAPABILITY_MINIMA_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.BasicInformationClusterCapabilityMinimaStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CAPABILITY_MINIMA_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readProductAppearanceAttribute( - ProductAppearanceAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_APPEARANCE_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.BasicInformationClusterProductAppearanceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeProductAppearanceAttribute( - ProductAppearanceAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRODUCT_APPEARANCE_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.BasicInformationClusterProductAppearanceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSpecificationVersionAttribute( + public void readFeatureMapAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -6403,24 +5946,24 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SPECIFICATION_VERSION_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeSpecificationVersionAttribute( + public void subscribeFeatureMapAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SPECIFICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxPathsPerInvokeAttribute( + public void readClusterRevisionAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -6428,19 +5971,218 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeMaxPathsPerInvokeAttribute( + public void subscribeClusterRevisionAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 42L; + + private static final long DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID = 0L; + private static final long UPDATE_POSSIBLE_ATTRIBUTE_ID = 1L; + private static final long UPDATE_STATE_ATTRIBUTE_ID = 2L; + private static final long UPDATE_STATE_PROGRESS_ATTRIBUTE_ID = 3L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void announceOTAProvider(DefaultClusterCallback callback, Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint) { + announceOTAProvider(callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, 0); + } + + public void announceOTAProvider(DefaultClusterCallback callback, Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long providerNodeIDFieldID = 0L; + BaseTLVType providerNodeIDtlvValue = new UIntType(providerNodeID); + elements.add(new StructElement(providerNodeIDFieldID, providerNodeIDtlvValue)); + + final long vendorIDFieldID = 1L; + BaseTLVType vendorIDtlvValue = new UIntType(vendorID); + elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); + + final long announcementReasonFieldID = 2L; + BaseTLVType announcementReasontlvValue = new UIntType(announcementReason); + elements.add(new StructElement(announcementReasonFieldID, announcementReasontlvValue)); + + final long metadataForNodeFieldID = 3L; + BaseTLVType metadataForNodetlvValue = metadataForNode.map((nonOptionalmetadataForNode) -> new ByteArrayType(nonOptionalmetadataForNode)).orElse(new EmptyType()); + elements.add(new StructElement(metadataForNodeFieldID, metadataForNodetlvValue)); + + final long endpointFieldID = 4L; + BaseTLVType endpointtlvValue = new UIntType(endpoint); + elements.add(new StructElement(endpointFieldID, endpointtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface DefaultOTAProvidersAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface UpdateStateProgressAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readDefaultOTAProvidersAttribute( + DefaultOTAProvidersAttributeCallback callback) { + readDefaultOTAProvidersAttributeWithFabricFilter(callback, true); + } + + public void readDefaultOTAProvidersAttributeWithFabricFilter( + DefaultOTAProvidersAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, isFabricFiltered); + } + + public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { + writeDefaultOTAProvidersAttribute(callback, value, 0); + } + + public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDefaultOTAProvidersAttribute( + DefaultOTAProvidersAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUpdatePossibleAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_POSSIBLE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, UPDATE_POSSIBLE_ATTRIBUTE_ID, true); + } + + public void subscribeUpdatePossibleAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_POSSIBLE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, UPDATE_POSSIBLE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUpdateStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, UPDATE_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeUpdateStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, UPDATE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readUpdateStateProgressAttribute( + UpdateStateProgressAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, true); + } + + public void subscribeUpdateStateProgressAttribute( + UpdateStateProgressAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -6594,9 +6336,11 @@ public void onSuccess(byte[] tlv) { } } - public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 41L; + public static class LocalizationConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 43L; + private static final long ACTIVE_LOCALE_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_LOCALES_ATTRIBUTE_ID = 1L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -6604,7 +6348,7 @@ public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -6614,200 +6358,83 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { - queryImage(callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, 0); + public interface SupportedLocalesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void queryImage(QueryImageResponseCallback callback, Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider, int timedInvokeTimeoutMs) { - final long commandId = 0L; + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - ArrayList elements = new ArrayList<>(); - final long vendorIDFieldID = 0L; - BaseTLVType vendorIDtlvValue = new UIntType(vendorID); - elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long productIDFieldID = 1L; - BaseTLVType productIDtlvValue = new UIntType(productID); - elements.add(new StructElement(productIDFieldID, productIDtlvValue)); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long softwareVersionFieldID = 2L; - BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); - elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } - final long protocolsSupportedFieldID = 3L; - BaseTLVType protocolsSupportedtlvValue = ArrayType.generateArrayType(protocolsSupported, (elementprotocolsSupported) -> new UIntType(elementprotocolsSupported)); - elements.add(new StructElement(protocolsSupportedFieldID, protocolsSupportedtlvValue)); + public void readActiveLocaleAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_LOCALE_ATTRIBUTE_ID); - final long hardwareVersionFieldID = 4L; - BaseTLVType hardwareVersiontlvValue = hardwareVersion.map((nonOptionalhardwareVersion) -> new UIntType(nonOptionalhardwareVersion)).orElse(new EmptyType()); - elements.add(new StructElement(hardwareVersionFieldID, hardwareVersiontlvValue)); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_LOCALE_ATTRIBUTE_ID, true); + } - final long locationFieldID = 5L; - BaseTLVType locationtlvValue = location.map((nonOptionallocation) -> new StringType(nonOptionallocation)).orElse(new EmptyType()); - elements.add(new StructElement(locationFieldID, locationtlvValue)); - - final long requestorCanConsentFieldID = 6L; - BaseTLVType requestorCanConsenttlvValue = requestorCanConsent.map((nonOptionalrequestorCanConsent) -> new BooleanType(nonOptionalrequestorCanConsent)).orElse(new EmptyType()); - elements.add(new StructElement(requestorCanConsentFieldID, requestorCanConsenttlvValue)); - - final long metadataForProviderFieldID = 7L; - BaseTLVType metadataForProvidertlvValue = metadataForProvider.map((nonOptionalmetadataForProvider) -> new ByteArrayType(nonOptionalmetadataForProvider)).orElse(new EmptyType()); - elements.add(new StructElement(metadataForProviderFieldID, metadataForProvidertlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long delayedActionTimeFieldID = 1L; - Optional delayedActionTime = Optional.empty(); - final long imageURIFieldID = 2L; - Optional imageURI = Optional.empty(); - final long softwareVersionFieldID = 3L; - Optional softwareVersion = Optional.empty(); - final long softwareVersionStringFieldID = 4L; - Optional softwareVersionString = Optional.empty(); - final long updateTokenFieldID = 5L; - Optional updateToken = Optional.empty(); - final long userConsentNeededFieldID = 6L; - Optional userConsentNeeded = Optional.empty(); - final long metadataForRequestorFieldID = 7L; - Optional metadataForRequestor = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == delayedActionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - delayedActionTime = Optional.of(castingValue.value(Long.class)); - } - } else if (element.contextTagNum() == imageURIFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - imageURI = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == softwareVersionFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - softwareVersion = Optional.of(castingValue.value(Long.class)); - } - } else if (element.contextTagNum() == softwareVersionStringFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - softwareVersionString = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == updateTokenFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - updateToken = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == userConsentNeededFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { - BooleanType castingValue = element.value(BooleanType.class); - userConsentNeeded = Optional.of(castingValue.value(Boolean.class)); - } - } else if (element.contextTagNum() == metadataForRequestorFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - metadataForRequestor = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(status, delayedActionTime, imageURI, softwareVersion, softwareVersionString, updateToken, userConsentNeeded, metadataForRequestor); - }}, commandId, value, timedInvokeTimeoutMs); + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { + writeActiveLocaleAttribute(callback, value, 0); } - public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion) { - applyUpdateRequest(callback, updateToken, newVersion, 0); + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new StringType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_LOCALE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void applyUpdateRequest(ApplyUpdateResponseCallback callback, byte[] updateToken, Long newVersion, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long updateTokenFieldID = 0L; - BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); - elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); - - final long newVersionFieldID = 1L; - BaseTLVType newVersiontlvValue = new UIntType(newVersion); - elements.add(new StructElement(newVersionFieldID, newVersiontlvValue)); + public void subscribeActiveLocaleAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_LOCALE_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - final long actionFieldID = 0L; - Integer action = null; - final long delayedActionTimeFieldID = 1L; - Long delayedActionTime = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == actionFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - action = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == delayedActionTimeFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - delayedActionTime = castingValue.value(Long.class); - } - } + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - callback.onSuccess(action, delayedActionTime); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion) { - notifyUpdateApplied(callback, updateToken, softwareVersion, 0); + }, ACTIVE_LOCALE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void notifyUpdateApplied(DefaultClusterCallback callback, byte[] updateToken, Long softwareVersion, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - final long updateTokenFieldID = 0L; - BaseTLVType updateTokentlvValue = new ByteArrayType(updateToken); - elements.add(new StructElement(updateTokenFieldID, updateTokentlvValue)); - - final long softwareVersionFieldID = 1L; - BaseTLVType softwareVersiontlvValue = new UIntType(softwareVersion); - elements.add(new StructElement(softwareVersionFieldID, softwareVersiontlvValue)); + public void readSupportedLocalesAttribute( + SupportedLocalesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCALES_ATTRIBUTE_ID); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { + readAttribute(new ReportCallbackImpl(callback, path) { @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface QueryImageResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); - } - - public interface ApplyUpdateResponseCallback extends BaseClusterCallback { - void onSuccess(Integer action, Long delayedActionTime); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_LOCALES_ATTRIBUTE_ID, true); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeSupportedLocalesAttribute( + SupportedLocalesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCALES_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_LOCALES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -6961,13 +6588,12 @@ public void onSuccess(byte[] tlv) { } } - public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 42L; + public static class TimeFormatLocalizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 44L; - private static final long DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID = 0L; - private static final long UPDATE_POSSIBLE_ATTRIBUTE_ID = 1L; - private static final long UPDATE_STATE_ATTRIBUTE_ID = 2L; - private static final long UPDATE_STATE_PROGRESS_ATTRIBUTE_ID = 3L; + private static final long HOUR_FORMAT_ATTRIBUTE_ID = 0L; + private static final long ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID = 1L; + private static final long SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID = 2L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -6975,7 +6601,7 @@ public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { + public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -6985,48 +6611,8 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void announceOTAProvider(DefaultClusterCallback callback, Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint) { - announceOTAProvider(callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, 0); - } - - public void announceOTAProvider(DefaultClusterCallback callback, Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long providerNodeIDFieldID = 0L; - BaseTLVType providerNodeIDtlvValue = new UIntType(providerNodeID); - elements.add(new StructElement(providerNodeIDFieldID, providerNodeIDtlvValue)); - - final long vendorIDFieldID = 1L; - BaseTLVType vendorIDtlvValue = new UIntType(vendorID); - elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); - - final long announcementReasonFieldID = 2L; - BaseTLVType announcementReasontlvValue = new UIntType(announcementReason); - elements.add(new StructElement(announcementReasonFieldID, announcementReasontlvValue)); - - final long metadataForNodeFieldID = 3L; - BaseTLVType metadataForNodetlvValue = metadataForNode.map((nonOptionalmetadataForNode) -> new ByteArrayType(nonOptionalmetadataForNode)).orElse(new EmptyType()); - elements.add(new StructElement(metadataForNodeFieldID, metadataForNodetlvValue)); - - final long endpointFieldID = 4L; - BaseTLVType endpointtlvValue = new UIntType(endpoint); - elements.add(new StructElement(endpointFieldID, endpointtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface DefaultOTAProvidersAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface UpdateStateProgressAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedCalendarTypesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -7045,118 +6631,97 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readDefaultOTAProvidersAttribute( - DefaultOTAProvidersAttributeCallback callback) { - readDefaultOTAProvidersAttributeWithFabricFilter(callback, true); - } - - public void readDefaultOTAProvidersAttributeWithFabricFilter( - DefaultOTAProvidersAttributeCallback callback, boolean isFabricFiltered) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID); + public void readHourFormatAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOUR_FORMAT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, isFabricFiltered); + }, HOUR_FORMAT_ATTRIBUTE_ID, true); } - public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { - writeDefaultOTAProvidersAttribute(callback, value, 0); - } + public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value) { + writeHourFormatAttribute(callback, value, 0); + } - public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); - writeAttribute(new WriteAttributesCallbackImpl(callback), DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), HOUR_FORMAT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeDefaultOTAProvidersAttribute( - DefaultOTAProvidersAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID); + public void subscribeHourFormatAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOUR_FORMAT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEFAULT_O_T_A_PROVIDERS_ATTRIBUTE_ID, minInterval, maxInterval); + }, HOUR_FORMAT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUpdatePossibleAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_POSSIBLE_ATTRIBUTE_ID); + public void readActiveCalendarTypeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, UPDATE_POSSIBLE_ATTRIBUTE_ID, true); + }, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, true); } - public void subscribeUpdatePossibleAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_POSSIBLE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, UPDATE_POSSIBLE_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeActiveCalendarTypeAttribute(callback, value, 0); } - public void readUpdateStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, UPDATE_STATE_ATTRIBUTE_ID, true); + public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeUpdateStateAttribute( + public void subscribeActiveCalendarTypeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, UPDATE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readUpdateStateProgressAttribute( - UpdateStateProgressAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID); + public void readSupportedCalendarTypesAttribute( + SupportedCalendarTypesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, true); + }, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID, true); } - public void subscribeUpdateStateProgressAttribute( - UpdateStateProgressAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID); + public void subscribeSupportedCalendarTypesAttribute( + SupportedCalendarTypesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, UPDATE_STATE_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -7310,11 +6875,10 @@ public void onSuccess(byte[] tlv) { } } - public static class LocalizationConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 43L; + public static class UnitLocalizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 45L; - private static final long ACTIVE_LOCALE_ATTRIBUTE_ID = 0L; - private static final long SUPPORTED_LOCALES_ATTRIBUTE_ID = 1L; + private static final long TEMPERATURE_UNIT_ATTRIBUTE_ID = 0L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -7322,7 +6886,7 @@ public static class LocalizationConfigurationCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LocalizationConfigurationCluster(long devicePtr, int endpointId) { + public UnitLocalizationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -7332,10 +6896,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface SupportedLocalesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -7352,63 +6912,38 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readActiveLocaleAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_LOCALE_ATTRIBUTE_ID); + public void readTemperatureUnitAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_UNIT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTIVE_LOCALE_ATTRIBUTE_ID, true); - } - - public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { - writeActiveLocaleAttribute(callback, value, 0); - } - - public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_LOCALE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, TEMPERATURE_UNIT_ATTRIBUTE_ID, true); } - public void subscribeActiveLocaleAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_LOCALE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACTIVE_LOCALE_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value) { + writeTemperatureUnitAttribute(callback, value, 0); } - public void readSupportedLocalesAttribute( - SupportedLocalesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCALES_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_LOCALES_ATTRIBUTE_ID, true); + public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), TEMPERATURE_UNIT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeSupportedLocalesAttribute( - SupportedLocalesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCALES_ATTRIBUTE_ID); + public void subscribeTemperatureUnitAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_UNIT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_LOCALES_ATTRIBUTE_ID, minInterval, maxInterval); + }, TEMPERATURE_UNIT_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -7562,12 +7097,10 @@ public void onSuccess(byte[] tlv) { } } - public static class TimeFormatLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 44L; + public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 46L; - private static final long HOUR_FORMAT_ATTRIBUTE_ID = 0L; - private static final long ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID = 1L; - private static final long SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID = 2L; + private static final long SOURCES_ATTRIBUTE_ID = 0L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -7575,7 +7108,7 @@ public static class TimeFormatLocalizationCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { + public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -7585,7 +7118,7 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface SupportedCalendarTypesAttributeCallback extends BaseAttributeCallback { + public interface SourcesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -7605,77 +7138,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readHourFormatAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOUR_FORMAT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, HOUR_FORMAT_ATTRIBUTE_ID, true); - } - - public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value) { - writeHourFormatAttribute(callback, value, 0); - } - - public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), HOUR_FORMAT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeHourFormatAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HOUR_FORMAT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, HOUR_FORMAT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActiveCalendarTypeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, true); - } - - public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value) { - writeActiveCalendarTypeAttribute(callback, value, 0); - } - - public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeActiveCalendarTypeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACTIVE_CALENDAR_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSupportedCalendarTypesAttribute( - SupportedCalendarTypesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID); + public void readSourcesAttribute( + SourcesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOURCES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -7683,19 +7148,19 @@ public void onSuccess(byte[] tlv) { List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID, true); + }, SOURCES_ATTRIBUTE_ID, true); } - public void subscribeSupportedCalendarTypesAttribute( - SupportedCalendarTypesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID); + public void subscribeSourcesAttribute( + SourcesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOURCES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_CALENDAR_TYPES_ATTRIBUTE_ID, minInterval, maxInterval); + }, SOURCES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -7849,18 +7314,49 @@ public void onSuccess(byte[] tlv) { } } - public static class UnitLocalizationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 45L; + public static class PowerSourceCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 47L; - private static final long TEMPERATURE_UNIT_ATTRIBUTE_ID = 0L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + private static final long STATUS_ATTRIBUTE_ID = 0L; + private static final long ORDER_ATTRIBUTE_ID = 1L; + private static final long DESCRIPTION_ATTRIBUTE_ID = 2L; + private static final long WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID = 3L; + private static final long WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID = 4L; + private static final long WIRED_CURRENT_TYPE_ATTRIBUTE_ID = 5L; + private static final long WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID = 6L; + private static final long WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID = 7L; + private static final long WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID = 8L; + private static final long WIRED_PRESENT_ATTRIBUTE_ID = 9L; + private static final long ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID = 10L; + private static final long BAT_VOLTAGE_ATTRIBUTE_ID = 11L; + private static final long BAT_PERCENT_REMAINING_ATTRIBUTE_ID = 12L; + private static final long BAT_TIME_REMAINING_ATTRIBUTE_ID = 13L; + private static final long BAT_CHARGE_LEVEL_ATTRIBUTE_ID = 14L; + private static final long BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID = 15L; + private static final long BAT_REPLACEABILITY_ATTRIBUTE_ID = 16L; + private static final long BAT_PRESENT_ATTRIBUTE_ID = 17L; + private static final long ACTIVE_BAT_FAULTS_ATTRIBUTE_ID = 18L; + private static final long BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID = 19L; + private static final long BAT_COMMON_DESIGNATION_ATTRIBUTE_ID = 20L; + private static final long BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID = 21L; + private static final long BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID = 22L; + private static final long BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID = 23L; + private static final long BAT_CAPACITY_ATTRIBUTE_ID = 24L; + private static final long BAT_QUANTITY_ATTRIBUTE_ID = 25L; + private static final long BAT_CHARGE_STATE_ATTRIBUTE_ID = 26L; + private static final long BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID = 27L; + private static final long BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID = 28L; + private static final long BAT_CHARGING_CURRENT_ATTRIBUTE_ID = 29L; + private static final long ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID = 30L; + private static final long ENDPOINT_LIST_ATTRIBUTE_ID = 31L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public UnitLocalizationCluster(long devicePtr, int endpointId) { + public PowerSourceCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -7870,6 +7366,54 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public interface WiredAssessedInputVoltageAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface WiredAssessedInputFrequencyAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface WiredAssessedCurrentAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ActiveWiredFaultsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface BatVoltageAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface BatPercentRemainingAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface BatTimeRemainingAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ActiveBatFaultsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface BatTimeToFullChargeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface BatChargingCurrentAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ActiveBatChargeFaultsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EndpointListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -7886,9 +7430,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readTemperatureUnitAttribute( + public void readStatusAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_UNIT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -7896,225 +7440,249 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TEMPERATURE_UNIT_ATTRIBUTE_ID, true); + }, STATUS_ATTRIBUTE_ID, true); } - public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value) { - writeTemperatureUnitAttribute(callback, value, 0); + public void subscribeStatusAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STATUS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), TEMPERATURE_UNIT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void readOrderAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ORDER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ORDER_ATTRIBUTE_ID, true); } - public void subscribeTemperatureUnitAttribute( + public void subscribeOrderAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_UNIT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ORDER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TEMPERATURE_UNIT_ATTRIBUTE_ID, minInterval, maxInterval); + }, ORDER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readDescriptionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, DESCRIPTION_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readWiredAssessedInputVoltageAttribute( + WiredAssessedInputVoltageAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeWiredAssessedInputVoltageAttribute( + WiredAssessedInputVoltageAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readWiredAssessedInputFrequencyAttribute( + WiredAssessedInputFrequencyAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeWiredAssessedInputFrequencyAttribute( + WiredAssessedInputFrequencyAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readWiredCurrentTypeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_CURRENT_TYPE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, WIRED_CURRENT_TYPE_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeWiredCurrentTypeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_CURRENT_TYPE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, WIRED_CURRENT_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readWiredAssessedCurrentAttribute( + WiredAssessedCurrentAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void subscribeWiredAssessedCurrentAttribute( + WiredAssessedCurrentAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void readWiredNominalVoltageAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void subscribeWiredNominalVoltageAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + }, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); } - } - public static class PowerSourceConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 46L; + public void readWiredMaximumCurrentAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID); - private static final long SOURCES_ATTRIBUTE_ID = 0L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID, true); } - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } + public void subscribeWiredMaximumCurrentAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID); - public interface SourcesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void readWiredPresentAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_PRESENT_ATTRIBUTE_ID); - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, WIRED_PRESENT_ATTRIBUTE_ID, true); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeWiredPresentAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_PRESENT_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, WIRED_PRESENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSourcesAttribute( - SourcesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOURCES_ATTRIBUTE_ID); + public void readActiveWiredFaultsAttribute( + ActiveWiredFaultsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8122,149 +7690,149 @@ public void onSuccess(byte[] tlv) { List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SOURCES_ATTRIBUTE_ID, true); + }, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID, true); } - public void subscribeSourcesAttribute( - SourcesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOURCES_ATTRIBUTE_ID); + public void subscribeActiveWiredFaultsAttribute( + ActiveWiredFaultsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SOURCES_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readBatVoltageAttribute( + BatVoltageAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_VOLTAGE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, BAT_VOLTAGE_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeBatVoltageAttribute( + BatVoltageAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_VOLTAGE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readBatPercentRemainingAttribute( + BatPercentRemainingAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PERCENT_REMAINING_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, BAT_PERCENT_REMAINING_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeBatPercentRemainingAttribute( + BatPercentRemainingAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PERCENT_REMAINING_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_PERCENT_REMAINING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readBatTimeRemainingAttribute( + BatTimeRemainingAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_REMAINING_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, BAT_TIME_REMAINING_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeBatTimeRemainingAttribute( + BatTimeRemainingAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_REMAINING_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_TIME_REMAINING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readBatChargeLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, BAT_CHARGE_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeBatChargeLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_CHARGE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readBatReplacementNeededAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void subscribeBatReplacementNeededAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( + public void readBatReplaceabilityAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEABILITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8272,166 +7840,99 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, BAT_REPLACEABILITY_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( + public void subscribeBatReplaceabilityAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEABILITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_REPLACEABILITY_ATTRIBUTE_ID, minInterval, maxInterval); } - } - - public static class PowerSourceCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 47L; - private static final long STATUS_ATTRIBUTE_ID = 0L; - private static final long ORDER_ATTRIBUTE_ID = 1L; - private static final long DESCRIPTION_ATTRIBUTE_ID = 2L; - private static final long WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID = 3L; - private static final long WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID = 4L; - private static final long WIRED_CURRENT_TYPE_ATTRIBUTE_ID = 5L; - private static final long WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID = 6L; - private static final long WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID = 7L; - private static final long WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID = 8L; - private static final long WIRED_PRESENT_ATTRIBUTE_ID = 9L; - private static final long ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID = 10L; - private static final long BAT_VOLTAGE_ATTRIBUTE_ID = 11L; - private static final long BAT_PERCENT_REMAINING_ATTRIBUTE_ID = 12L; - private static final long BAT_TIME_REMAINING_ATTRIBUTE_ID = 13L; - private static final long BAT_CHARGE_LEVEL_ATTRIBUTE_ID = 14L; - private static final long BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID = 15L; - private static final long BAT_REPLACEABILITY_ATTRIBUTE_ID = 16L; - private static final long BAT_PRESENT_ATTRIBUTE_ID = 17L; - private static final long ACTIVE_BAT_FAULTS_ATTRIBUTE_ID = 18L; - private static final long BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID = 19L; - private static final long BAT_COMMON_DESIGNATION_ATTRIBUTE_ID = 20L; - private static final long BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID = 21L; - private static final long BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID = 22L; - private static final long BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID = 23L; - private static final long BAT_CAPACITY_ATTRIBUTE_ID = 24L; - private static final long BAT_QUANTITY_ATTRIBUTE_ID = 25L; - private static final long BAT_CHARGE_STATE_ATTRIBUTE_ID = 26L; - private static final long BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID = 27L; - private static final long BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID = 28L; - private static final long BAT_CHARGING_CURRENT_ATTRIBUTE_ID = 29L; - private static final long ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID = 30L; - private static final long ENDPOINT_LIST_ATTRIBUTE_ID = 31L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + public void readBatPresentAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PRESENT_ATTRIBUTE_ID); - public PowerSourceCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BAT_PRESENT_ATTRIBUTE_ID, true); } - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } + public void subscribeBatPresentAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PRESENT_ATTRIBUTE_ID); - public interface WiredAssessedInputVoltageAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, BAT_PRESENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface WiredAssessedInputFrequencyAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface WiredAssessedCurrentAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface ActiveWiredFaultsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface BatVoltageAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface BatPercentRemainingAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface BatTimeRemainingAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface ActiveBatFaultsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface BatTimeToFullChargeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface BatChargingCurrentAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface ActiveBatChargeFaultsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EndpointListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void readActiveBatFaultsAttribute( + ActiveBatFaultsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID); - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID, true); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void subscribeActiveBatFaultsAttribute( + ActiveBatFaultsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID); - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStatusAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); + public void readBatReplacementDescriptionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATUS_ATTRIBUTE_ID, true); + }, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID, true); } - public void subscribeStatusAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_ATTRIBUTE_ID); + public void subscribeBatReplacementDescriptionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATUS_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOrderAttribute( + public void readBatCommonDesignationAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ORDER_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8439,24 +7940,24 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ORDER_ATTRIBUTE_ID, true); + }, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID, true); } - public void subscribeOrderAttribute( + public void subscribeBatCommonDesignationAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ORDER_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ORDER_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDescriptionAttribute( + public void readBatANSIDesignationAttribute( CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8464,174 +7965,174 @@ public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DESCRIPTION_ATTRIBUTE_ID, true); + }, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID, true); } - public void subscribeDescriptionAttribute( + public void subscribeBatANSIDesignationAttribute( CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredAssessedInputVoltageAttribute( - WiredAssessedInputVoltageAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID); + public void readBatIECDesignationAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID, true); + }, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID, true); } - public void subscribeWiredAssessedInputVoltageAttribute( - WiredAssessedInputVoltageAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID); + public void subscribeBatIECDesignationAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_ASSESSED_INPUT_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredAssessedInputFrequencyAttribute( - WiredAssessedInputFrequencyAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID); + public void readBatApprovedChemistryAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID, true); + }, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID, true); } - public void subscribeWiredAssessedInputFrequencyAttribute( - WiredAssessedInputFrequencyAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID); + public void subscribeBatApprovedChemistryAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_ASSESSED_INPUT_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredCurrentTypeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_CURRENT_TYPE_ATTRIBUTE_ID); + public void readBatCapacityAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CAPACITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_CURRENT_TYPE_ATTRIBUTE_ID, true); + }, BAT_CAPACITY_ATTRIBUTE_ID, true); } - public void subscribeWiredCurrentTypeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_CURRENT_TYPE_ATTRIBUTE_ID); + public void subscribeBatCapacityAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CAPACITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_CURRENT_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredAssessedCurrentAttribute( - WiredAssessedCurrentAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID); + public void readBatQuantityAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_QUANTITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID, true); + }, BAT_QUANTITY_ATTRIBUTE_ID, true); } - public void subscribeWiredAssessedCurrentAttribute( - WiredAssessedCurrentAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID); + public void subscribeBatQuantityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_QUANTITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_ASSESSED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_QUANTITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredNominalVoltageAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID); + public void readBatChargeStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID, true); + }, BAT_CHARGE_STATE_ATTRIBUTE_ID, true); } - public void subscribeWiredNominalVoltageAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID); + public void subscribeBatChargeStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_NOMINAL_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_CHARGE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredMaximumCurrentAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID); + public void readBatTimeToFullChargeAttribute( + BatTimeToFullChargeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID, true); + }, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID, true); } - public void subscribeWiredMaximumCurrentAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID); + public void subscribeBatTimeToFullChargeAttribute( + BatTimeToFullChargeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_MAXIMUM_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readWiredPresentAttribute( + public void readBatFunctionalWhileChargingAttribute( BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_PRESENT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8639,49 +8140,24 @@ public void onSuccess(byte[] tlv) { Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, WIRED_PRESENT_ATTRIBUTE_ID, true); + }, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID, true); } - public void subscribeWiredPresentAttribute( + public void subscribeBatFunctionalWhileChargingAttribute( BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WIRED_PRESENT_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, WIRED_PRESENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readActiveWiredFaultsAttribute( - ActiveWiredFaultsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID, true); - } - - public void subscribeActiveWiredFaultsAttribute( - ActiveWiredFaultsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACTIVE_WIRED_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readBatVoltageAttribute( - BatVoltageAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_VOLTAGE_ATTRIBUTE_ID); + public void readBatChargingCurrentAttribute( + BatChargingCurrentAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGING_CURRENT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8689,224 +8165,199 @@ public void onSuccess(byte[] tlv) { @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_VOLTAGE_ATTRIBUTE_ID, true); + }, BAT_CHARGING_CURRENT_ATTRIBUTE_ID, true); } - public void subscribeBatVoltageAttribute( - BatVoltageAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_VOLTAGE_ATTRIBUTE_ID); + public void subscribeBatChargingCurrentAttribute( + BatChargingCurrentAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGING_CURRENT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readBatPercentRemainingAttribute( - BatPercentRemainingAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PERCENT_REMAINING_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BAT_PERCENT_REMAINING_ATTRIBUTE_ID, true); - } - - public void subscribeBatPercentRemainingAttribute( - BatPercentRemainingAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PERCENT_REMAINING_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BAT_PERCENT_REMAINING_ATTRIBUTE_ID, minInterval, maxInterval); + }, BAT_CHARGING_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatTimeRemainingAttribute( - BatTimeRemainingAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_REMAINING_ATTRIBUTE_ID); + public void readActiveBatChargeFaultsAttribute( + ActiveBatChargeFaultsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_TIME_REMAINING_ATTRIBUTE_ID, true); + }, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID, true); } - public void subscribeBatTimeRemainingAttribute( - BatTimeRemainingAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_REMAINING_ATTRIBUTE_ID); + public void subscribeActiveBatChargeFaultsAttribute( + ActiveBatChargeFaultsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_TIME_REMAINING_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatChargeLevelAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_LEVEL_ATTRIBUTE_ID); + public void readEndpointListAttribute( + EndpointListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_CHARGE_LEVEL_ATTRIBUTE_ID, true); + }, ENDPOINT_LIST_ATTRIBUTE_ID, true); } - public void subscribeBatChargeLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_LEVEL_ATTRIBUTE_ID); + public void subscribeEndpointListAttribute( + EndpointListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_CHARGE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + }, ENDPOINT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatReplacementNeededAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeBatReplacementNeededAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_REPLACEMENT_NEEDED_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatReplaceabilityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEABILITY_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_REPLACEABILITY_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeBatReplaceabilityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEABILITY_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_REPLACEABILITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatPresentAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PRESENT_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_PRESENT_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeBatPresentAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_PRESENT_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_PRESENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readActiveBatFaultsAttribute( - ActiveBatFaultsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeActiveBatFaultsAttribute( - ActiveBatFaultsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACTIVE_BAT_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatReplacementDescriptionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeBatReplacementDescriptionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_REPLACEMENT_DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatCommonDesignationAttribute( + public void readClusterRevisionAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -8914,99 +8365,201 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeBatCommonDesignationAttribute( + public void subscribeClusterRevisionAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_COMMON_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readBatANSIDesignationAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID); + public static class GeneralCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 48L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID, true); + private static final long BREADCRUMB_ATTRIBUTE_ID = 0L; + private static final long BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID = 1L; + private static final long REGULATORY_CONFIG_ATTRIBUTE_ID = 2L; + private static final long LOCATION_CAPABILITY_ATTRIBUTE_ID = 3L; + private static final long SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID = 4L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public GeneralCommissioningCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); } - public void subscribeBatANSIDesignationAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID); + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BAT_A_N_S_I_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); + public void armFailSafe(ArmFailSafeResponseCallback callback, Integer expiryLengthSeconds, Long breadcrumb) { + armFailSafe(callback, expiryLengthSeconds, breadcrumb, 0); } - public void readBatIECDesignationAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID); + public void armFailSafe(ArmFailSafeResponseCallback callback, Integer expiryLengthSeconds, Long breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 0L; - readAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long expiryLengthSecondsFieldID = 0L; + BaseTLVType expiryLengthSecondstlvValue = new UIntType(expiryLengthSeconds); + elements.add(new StructElement(expiryLengthSecondsFieldID, expiryLengthSecondstlvValue)); + + final long breadcrumbFieldID = 1L; + BaseTLVType breadcrumbtlvValue = new UIntType(breadcrumb); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long errorCodeFieldID = 0L; + Integer errorCode = null; + final long debugTextFieldID = 1L; + String debugText = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == errorCodeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + errorCode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = castingValue.value(String.class); + } + } } - }, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID, true); + callback.onSuccess(errorCode, debugText); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeBatIECDesignationAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID); + public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback, Integer newRegulatoryConfig, String countryCode, Long breadcrumb) { + setRegulatoryConfig(callback, newRegulatoryConfig, countryCode, breadcrumb, 0); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { + public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback, Integer newRegulatoryConfig, String countryCode, Long breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long newRegulatoryConfigFieldID = 0L; + BaseTLVType newRegulatoryConfigtlvValue = new UIntType(newRegulatoryConfig); + elements.add(new StructElement(newRegulatoryConfigFieldID, newRegulatoryConfigtlvValue)); + + final long countryCodeFieldID = 1L; + BaseTLVType countryCodetlvValue = new StringType(countryCode); + elements.add(new StructElement(countryCodeFieldID, countryCodetlvValue)); + + final long breadcrumbFieldID = 2L; + BaseTLVType breadcrumbtlvValue = new UIntType(breadcrumb); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + public void onResponse(StructType invokeStructValue) { + final long errorCodeFieldID = 0L; + Integer errorCode = null; + final long debugTextFieldID = 1L; + String debugText = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == errorCodeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + errorCode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = castingValue.value(String.class); + } + } } - }, BAT_I_E_C_DESIGNATION_ATTRIBUTE_ID, minInterval, maxInterval); + callback.onSuccess(errorCode, debugText); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readBatApprovedChemistryAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID); + public void commissioningComplete(CommissioningCompleteResponseCallback callback) { + commissioningComplete(callback, 0); + } - readAttribute(new ReportCallbackImpl(callback, path) { + public void commissioningComplete(CommissioningCompleteResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long errorCodeFieldID = 0L; + Integer errorCode = null; + final long debugTextFieldID = 1L; + String debugText = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == errorCodeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + errorCode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = castingValue.value(String.class); + } + } } - }, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID, true); + callback.onSuccess(errorCode, debugText); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeBatApprovedChemistryAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID); + public interface ArmFailSafeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer errorCode, String debugText); + } - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BAT_APPROVED_CHEMISTRY_ATTRIBUTE_ID, minInterval, maxInterval); + public interface SetRegulatoryConfigResponseCallback extends BaseClusterCallback { + void onSuccess(Integer errorCode, String debugText); } - public void readBatCapacityAttribute( + public interface CommissioningCompleteResponseCallback extends BaseClusterCallback { + void onSuccess(Integer errorCode, String debugText); + } + + public interface BasicCommissioningInfoAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readBreadcrumbAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CAPACITY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BREADCRUMB_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -9014,49 +8567,58 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_CAPACITY_ATTRIBUTE_ID, true); + }, BREADCRUMB_ATTRIBUTE_ID, true); } - public void subscribeBatCapacityAttribute( + public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { + writeBreadcrumbAttribute(callback, value, 0); + } + + public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), BREADCRUMB_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeBreadcrumbAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CAPACITY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BREADCRUMB_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, BREADCRUMB_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatQuantityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_QUANTITY_ATTRIBUTE_ID); + public void readBasicCommissioningInfoAttribute( + BasicCommissioningInfoAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_QUANTITY_ATTRIBUTE_ID, true); + }, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID, true); } - public void subscribeBatQuantityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_QUANTITY_ATTRIBUTE_ID); + public void subscribeBasicCommissioningInfoAttribute( + BasicCommissioningInfoAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_QUANTITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatChargeStateAttribute( + public void readRegulatoryConfigAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REGULATORY_CONFIG_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -9064,49 +8626,49 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_CHARGE_STATE_ATTRIBUTE_ID, true); + }, REGULATORY_CONFIG_ATTRIBUTE_ID, true); } - public void subscribeBatChargeStateAttribute( + public void subscribeRegulatoryConfigAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGE_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REGULATORY_CONFIG_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_CHARGE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, REGULATORY_CONFIG_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatTimeToFullChargeAttribute( - BatTimeToFullChargeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID); + public void readLocationCapabilityAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_CAPABILITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID, true); + }, LOCATION_CAPABILITY_ATTRIBUTE_ID, true); } - public void subscribeBatTimeToFullChargeAttribute( - BatTimeToFullChargeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID); + public void subscribeLocationCapabilityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_CAPABILITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_TIME_TO_FULL_CHARGE_ATTRIBUTE_ID, minInterval, maxInterval); + }, LOCATION_CAPABILITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatFunctionalWhileChargingAttribute( + public void readSupportsConcurrentConnectionAttribute( BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -9114,107 +8676,32 @@ public void onSuccess(byte[] tlv) { Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID, true); + }, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID, true); } - public void subscribeBatFunctionalWhileChargingAttribute( + public void subscribeSupportsConcurrentConnectionAttribute( BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BAT_FUNCTIONAL_WHILE_CHARGING_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatChargingCurrentAttribute( - BatChargingCurrentAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGING_CURRENT_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BAT_CHARGING_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeBatChargingCurrentAttribute( - BatChargingCurrentAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BAT_CHARGING_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BAT_CHARGING_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActiveBatChargeFaultsAttribute( - ActiveBatChargeFaultsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID, true); - } - - public void subscribeActiveBatChargeFaultsAttribute( - ActiveBatChargeFaultsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACTIVE_BAT_CHARGE_FAULTS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readEndpointListAttribute( - EndpointListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ENDPOINT_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeEndpointListAttribute( - EndpointListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ENDPOINT_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ENDPOINT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } public void subscribeGeneratedCommandListAttribute( @@ -9355,14 +8842,20 @@ public void onSuccess(byte[] tlv) { } } - public static class GeneralCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 48L; + public static class NetworkCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 49L; - private static final long BREADCRUMB_ATTRIBUTE_ID = 0L; - private static final long BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID = 1L; - private static final long REGULATORY_CONFIG_ATTRIBUTE_ID = 2L; - private static final long LOCATION_CAPABILITY_ATTRIBUTE_ID = 3L; - private static final long SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID = 4L; + private static final long MAX_NETWORKS_ATTRIBUTE_ID = 0L; + private static final long NETWORKS_ATTRIBUTE_ID = 1L; + private static final long SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID = 2L; + private static final long CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID = 3L; + private static final long INTERFACE_ENABLED_ATTRIBUTE_ID = 4L; + private static final long LAST_NETWORKING_STATUS_ATTRIBUTE_ID = 5L; + private static final long LAST_NETWORK_I_D_ATTRIBUTE_ID = 6L; + private static final long LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID = 7L; + private static final long SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID = 8L; + private static final long SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID = 9L; + private static final long THREAD_VERSION_ATTRIBUTE_ID = 10L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -9370,7 +8863,7 @@ public static class GeneralCommissioningCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public GeneralCommissioningCluster(long devicePtr, int endpointId) { + public NetworkCommissioningCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -9380,244 +8873,523 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void armFailSafe(ArmFailSafeResponseCallback callback, Integer expiryLengthSeconds, Long breadcrumb) { - armFailSafe(callback, expiryLengthSeconds, breadcrumb, 0); + public void scanNetworks(ScanNetworksResponseCallback callback, @Nullable Optional ssid, Optional breadcrumb) { + scanNetworks(callback, ssid, breadcrumb, 0); } - public void armFailSafe(ArmFailSafeResponseCallback callback, Integer expiryLengthSeconds, Long breadcrumb, int timedInvokeTimeoutMs) { + public void scanNetworks(ScanNetworksResponseCallback callback, @Nullable Optional ssid, Optional breadcrumb, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long expiryLengthSecondsFieldID = 0L; - BaseTLVType expiryLengthSecondstlvValue = new UIntType(expiryLengthSeconds); - elements.add(new StructElement(expiryLengthSecondsFieldID, expiryLengthSecondstlvValue)); + final long ssidFieldID = 0L; + BaseTLVType ssidtlvValue = ssid != null ? ssid.map((nonOptionalssid) -> new ByteArrayType(nonOptionalssid)).orElse(new EmptyType()) : new NullType(); + elements.add(new StructElement(ssidFieldID, ssidtlvValue)); final long breadcrumbFieldID = 1L; - BaseTLVType breadcrumbtlvValue = new UIntType(breadcrumb); + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long errorCodeFieldID = 0L; - Integer errorCode = null; + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; final long debugTextFieldID = 1L; - String debugText = null; + Optional debugText = Optional.empty(); + final long wiFiScanResultsFieldID = 2L; + Optional> wiFiScanResults = Optional.empty(); + final long threadScanResultsFieldID = 3L; + Optional> threadScanResults = Optional.empty(); for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == errorCodeFieldID) { + if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - errorCode = castingValue.value(Integer.class); + networkingStatus = castingValue.value(Integer.class); } } else if (element.contextTagNum() == debugTextFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - debugText = castingValue.value(String.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == wiFiScanResultsFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + wiFiScanResults = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.NetworkCommissioningClusterWiFiInterfaceScanResultStruct.decodeTlv(elementcastingValue))); + } + } else if (element.contextTagNum() == threadScanResultsFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + threadScanResults = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.NetworkCommissioningClusterThreadInterfaceScanResultStruct.decodeTlv(elementcastingValue))); } } } - callback.onSuccess(errorCode, debugText); + callback.onSuccess(networkingStatus, debugText, wiFiScanResults, threadScanResults); }}, commandId, value, timedInvokeTimeoutMs); } - public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback, Integer newRegulatoryConfig, String countryCode, Long breadcrumb) { - setRegulatoryConfig(callback, newRegulatoryConfig, countryCode, breadcrumb, 0); + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce) { + addOrUpdateWiFiNetwork(callback, ssid, credentials, breadcrumb, networkIdentity, clientIdentifier, possessionNonce, 0); } - public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback, Integer newRegulatoryConfig, String countryCode, Long breadcrumb, int timedInvokeTimeoutMs) { + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long newRegulatoryConfigFieldID = 0L; - BaseTLVType newRegulatoryConfigtlvValue = new UIntType(newRegulatoryConfig); - elements.add(new StructElement(newRegulatoryConfigFieldID, newRegulatoryConfigtlvValue)); + final long ssidFieldID = 0L; + BaseTLVType ssidtlvValue = new ByteArrayType(ssid); + elements.add(new StructElement(ssidFieldID, ssidtlvValue)); - final long countryCodeFieldID = 1L; - BaseTLVType countryCodetlvValue = new StringType(countryCode); - elements.add(new StructElement(countryCodeFieldID, countryCodetlvValue)); + final long credentialsFieldID = 1L; + BaseTLVType credentialstlvValue = new ByteArrayType(credentials); + elements.add(new StructElement(credentialsFieldID, credentialstlvValue)); final long breadcrumbFieldID = 2L; - BaseTLVType breadcrumbtlvValue = new UIntType(breadcrumb); + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + final long networkIdentityFieldID = 3L; + BaseTLVType networkIdentitytlvValue = networkIdentity.map((nonOptionalnetworkIdentity) -> new ByteArrayType(nonOptionalnetworkIdentity)).orElse(new EmptyType()); + elements.add(new StructElement(networkIdentityFieldID, networkIdentitytlvValue)); + + final long clientIdentifierFieldID = 4L; + BaseTLVType clientIdentifiertlvValue = clientIdentifier.map((nonOptionalclientIdentifier) -> new ByteArrayType(nonOptionalclientIdentifier)).orElse(new EmptyType()); + elements.add(new StructElement(clientIdentifierFieldID, clientIdentifiertlvValue)); + + final long possessionNonceFieldID = 5L; + BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); + elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long errorCodeFieldID = 0L; - Integer errorCode = null; + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; final long debugTextFieldID = 1L; - String debugText = null; + Optional debugText = Optional.empty(); + final long networkIndexFieldID = 2L; + Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == errorCodeFieldID) { + if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - errorCode = castingValue.value(Integer.class); + networkingStatus = castingValue.value(Integer.class); } } else if (element.contextTagNum() == debugTextFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - debugText = castingValue.value(String.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == networkIndexFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkIndex = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); } } } - callback.onSuccess(errorCode, debugText); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } - public void commissioningComplete(CommissioningCompleteResponseCallback callback) { - commissioningComplete(callback, 0); + public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback, byte[] operationalDataset, Optional breadcrumb) { + addOrUpdateThreadNetwork(callback, operationalDataset, breadcrumb, 0); } - public void commissioningComplete(CommissioningCompleteResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 4L; + public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback, byte[] operationalDataset, Optional breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 3L; ArrayList elements = new ArrayList<>(); + final long operationalDatasetFieldID = 0L; + BaseTLVType operationalDatasettlvValue = new ByteArrayType(operationalDataset); + elements.add(new StructElement(operationalDatasetFieldID, operationalDatasettlvValue)); + + final long breadcrumbFieldID = 1L; + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long errorCodeFieldID = 0L; - Integer errorCode = null; + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; final long debugTextFieldID = 1L; - String debugText = null; + Optional debugText = Optional.empty(); + final long networkIndexFieldID = 2L; + Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == errorCodeFieldID) { + if (element.contextTagNum() == networkingStatusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - errorCode = castingValue.value(Integer.class); + networkingStatus = castingValue.value(Integer.class); } } else if (element.contextTagNum() == debugTextFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - debugText = castingValue.value(String.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == networkIndexFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkIndex = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); } } } - callback.onSuccess(errorCode, debugText); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); }}, commandId, value, timedInvokeTimeoutMs); } - public interface ArmFailSafeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer errorCode, String debugText); + public void removeNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Optional breadcrumb) { + removeNetwork(callback, networkID, breadcrumb, 0); } - public interface SetRegulatoryConfigResponseCallback extends BaseClusterCallback { - void onSuccess(Integer errorCode, String debugText); - } + public void removeNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Optional breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 4L; - public interface CommissioningCompleteResponseCallback extends BaseClusterCallback { - void onSuccess(Integer errorCode, String debugText); - } + ArrayList elements = new ArrayList<>(); + final long networkIDFieldID = 0L; + BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); + elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - public interface BasicCommissioningInfoAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value); - } + final long breadcrumbFieldID = 1L; + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; + final long debugTextFieldID = 1L; + Optional debugText = Optional.empty(); + final long networkIndexFieldID = 2L; + Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == networkingStatusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkingStatus = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == networkIndexFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkIndex = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } + } + } + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); + }}, commandId, value, timedInvokeTimeoutMs); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void connectNetwork(ConnectNetworkResponseCallback callback, byte[] networkID, Optional breadcrumb) { + connectNetwork(callback, networkID, breadcrumb, 0); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void connectNetwork(ConnectNetworkResponseCallback callback, byte[] networkID, Optional breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 6L; - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + ArrayList elements = new ArrayList<>(); + final long networkIDFieldID = 0L; + BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); + elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - public void readBreadcrumbAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BREADCRUMB_ATTRIBUTE_ID); + final long breadcrumbFieldID = 1L; + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; + final long debugTextFieldID = 1L; + Optional debugText = Optional.empty(); + final long errorValueFieldID = 2L; + @Nullable Long errorValue = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == networkingStatusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkingStatus = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == errorValueFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + errorValue = castingValue.value(Long.class); + } + } } - }, BREADCRUMB_ATTRIBUTE_ID, true); + callback.onSuccess(networkingStatus, debugText, errorValue); + }}, commandId, value, timedInvokeTimeoutMs); } - public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { - writeBreadcrumbAttribute(callback, value, 0); + public void reorderNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Integer networkIndex, Optional breadcrumb) { + reorderNetwork(callback, networkID, networkIndex, breadcrumb, 0); } - public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BREADCRUMB_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } + public void reorderNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Integer networkIndex, Optional breadcrumb, int timedInvokeTimeoutMs) { + final long commandId = 8L; - public void subscribeBreadcrumbAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BREADCRUMB_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long networkIDFieldID = 0L; + BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); + elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BREADCRUMB_ATTRIBUTE_ID, minInterval, maxInterval); - } + final long networkIndexFieldID = 1L; + BaseTLVType networkIndextlvValue = new UIntType(networkIndex); + elements.add(new StructElement(networkIndexFieldID, networkIndextlvValue)); - public void readBasicCommissioningInfoAttribute( - BasicCommissioningInfoAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID); + final long breadcrumbFieldID = 2L; + BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); + elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long networkingStatusFieldID = 0L; + Integer networkingStatus = null; + final long debugTextFieldID = 1L; + Optional debugText = Optional.empty(); + final long networkIndexFieldID = 2L; + Optional networkIndex = Optional.empty(); + final long clientIdentityFieldID = 3L; + Optional clientIdentity = Optional.empty(); + final long possessionSignatureFieldID = 4L; + Optional possessionSignature = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == networkingStatusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkingStatus = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == debugTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + debugText = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == networkIndexFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + networkIndex = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == clientIdentityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + clientIdentity = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } + } } - }, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID, true); + callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeBasicCommissioningInfoAttribute( - BasicCommissioningInfoAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, BASIC_COMMISSIONING_INFO_ATTRIBUTE_ID, minInterval, maxInterval); + public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce) { + queryIdentity(callback, keyIdentifier, possessionNonce, 0); } - public void readRegulatoryConfigAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REGULATORY_CONFIG_ATTRIBUTE_ID); + public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { + final long commandId = 9L; - readAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long keyIdentifierFieldID = 0L; + BaseTLVType keyIdentifiertlvValue = new ByteArrayType(keyIdentifier); + elements.add(new StructElement(keyIdentifierFieldID, keyIdentifiertlvValue)); + + final long possessionNonceFieldID = 1L; + BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); + elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long identityFieldID = 0L; + byte[] identity = null; + final long possessionSignatureFieldID = 1L; + Optional possessionSignature = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == identityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + identity = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == possessionSignatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + possessionSignature = Optional.of(castingValue.value(byte[].class)); + } + } } - }, REGULATORY_CONFIG_ATTRIBUTE_ID, true); + callback.onSuccess(identity, possessionSignature); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeRegulatoryConfigAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REGULATORY_CONFIG_ATTRIBUTE_ID); + public interface ScanNetworksResponseCallback extends BaseClusterCallback { + void onSuccess(Integer networkingStatus, Optional debugText, Optional> wiFiScanResults, Optional> threadScanResults); + } + + public interface NetworkConfigResponseCallback extends BaseClusterCallback { + void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex, Optional clientIdentity, Optional possessionSignature); + } + + public interface ConnectNetworkResponseCallback extends BaseClusterCallback { + void onSuccess(Integer networkingStatus, Optional debugText, @Nullable Long errorValue); + } + + public interface QueryIdentityResponseCallback extends BaseClusterCallback { + void onSuccess(byte[] identity, Optional possessionSignature); + } + + public interface NetworksAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface LastNetworkingStatusAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface LastNetworkIDAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface LastConnectErrorValueAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface SupportedWiFiBandsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readMaxNetworksAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORKS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_NETWORKS_ATTRIBUTE_ID, true); + } + + public void subscribeMaxNetworksAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORKS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REGULATORY_CONFIG_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_NETWORKS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLocationCapabilityAttribute( + public void readNetworksAttribute( + NetworksAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NETWORKS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NETWORKS_ATTRIBUTE_ID, true); + } + + public void subscribeNetworksAttribute( + NetworksAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NETWORKS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NETWORKS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readScanMaxTimeSecondsAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_CAPABILITY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -9625,174 +9397,183 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LOCATION_CAPABILITY_ATTRIBUTE_ID, true); + }, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, true); } - public void subscribeLocationCapabilityAttribute( + public void subscribeScanMaxTimeSecondsAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCATION_CAPABILITY_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LOCATION_CAPABILITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportsConcurrentConnectionAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID); + public void readConnectMaxTimeSecondsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID, true); + }, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, true); } - public void subscribeSupportsConcurrentConnectionAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID); + public void subscribeConnectMaxTimeSecondsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTS_CONCURRENT_CONNECTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readInterfaceEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, INTERFACE_ENABLED_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeInterfaceEnabledAttribute(callback, value, 0); + } + + public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), INTERFACE_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeInterfaceEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, INTERFACE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void readLastNetworkingStatusAttribute( + LastNetworkingStatusAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORKING_STATUS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, LAST_NETWORKING_STATUS_ATTRIBUTE_ID, true); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + public void subscribeLastNetworkingStatusAttribute( + LastNetworkingStatusAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORKING_STATUS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, LAST_NETWORKING_STATUS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void readLastNetworkIDAttribute( + LastNetworkIDAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORK_I_D_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EVENT_LIST_ATTRIBUTE_ID, true); + }, LAST_NETWORK_I_D_ATTRIBUTE_ID, true); } - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void subscribeLastNetworkIDAttribute( + LastNetworkIDAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORK_I_D_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, LAST_NETWORK_I_D_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void readLastConnectErrorValueAttribute( + LastConnectErrorValueAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + }, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, true); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void subscribeLastConnectErrorValueAttribute( + LastConnectErrorValueAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void readSupportedWiFiBandsAttribute( + SupportedWiFiBandsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + }, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID, true); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + public void subscribeSupportedWiFiBandsAttribute( + SupportedWiFiBandsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readClusterRevisionAttribute( + public void readSupportedThreadFeaturesAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -9800,36 +9581,200 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + }, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID, true); } - public void subscribeClusterRevisionAttribute( + public void subscribeSupportedThreadFeaturesAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID, minInterval, maxInterval); } - } - public static class NetworkCommissioningCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 49L; + public void readThreadVersionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, THREAD_VERSION_ATTRIBUTE_ID, true); + } + + public void subscribeThreadVersionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, THREAD_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class DiagnosticLogsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 50L; - private static final long MAX_NETWORKS_ATTRIBUTE_ID = 0L; - private static final long NETWORKS_ATTRIBUTE_ID = 1L; - private static final long SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID = 2L; - private static final long CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID = 3L; - private static final long INTERFACE_ENABLED_ATTRIBUTE_ID = 4L; - private static final long LAST_NETWORKING_STATUS_ATTRIBUTE_ID = 5L; - private static final long LAST_NETWORK_I_D_ATTRIBUTE_ID = 6L; - private static final long LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID = 7L; - private static final long SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID = 8L; - private static final long SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID = 9L; - private static final long THREAD_VERSION_ATTRIBUTE_ID = 10L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -9837,7 +9782,7 @@ public static class NetworkCommissioningCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public NetworkCommissioningCluster(long devicePtr, int endpointId) { + public DiagnosticLogsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -9847,981 +9792,62 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void scanNetworks(ScanNetworksResponseCallback callback, @Nullable Optional ssid, Optional breadcrumb) { - scanNetworks(callback, ssid, breadcrumb, 0); + public void retrieveLogsRequest(RetrieveLogsResponseCallback callback, Integer intent, Integer requestedProtocol, Optional transferFileDesignator) { + retrieveLogsRequest(callback, intent, requestedProtocol, transferFileDesignator, 0); } - public void scanNetworks(ScanNetworksResponseCallback callback, @Nullable Optional ssid, Optional breadcrumb, int timedInvokeTimeoutMs) { + public void retrieveLogsRequest(RetrieveLogsResponseCallback callback, Integer intent, Integer requestedProtocol, Optional transferFileDesignator, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long ssidFieldID = 0L; - BaseTLVType ssidtlvValue = ssid != null ? ssid.map((nonOptionalssid) -> new ByteArrayType(nonOptionalssid)).orElse(new EmptyType()) : new NullType(); - elements.add(new StructElement(ssidFieldID, ssidtlvValue)); + final long intentFieldID = 0L; + BaseTLVType intenttlvValue = new UIntType(intent); + elements.add(new StructElement(intentFieldID, intenttlvValue)); - final long breadcrumbFieldID = 1L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); + final long requestedProtocolFieldID = 1L; + BaseTLVType requestedProtocoltlvValue = new UIntType(requestedProtocol); + elements.add(new StructElement(requestedProtocolFieldID, requestedProtocoltlvValue)); + + final long transferFileDesignatorFieldID = 2L; + BaseTLVType transferFileDesignatortlvValue = transferFileDesignator.map((nonOptionaltransferFileDesignator) -> new StringType(nonOptionaltransferFileDesignator)).orElse(new EmptyType()); + elements.add(new StructElement(transferFileDesignatorFieldID, transferFileDesignatortlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long wiFiScanResultsFieldID = 2L; - Optional> wiFiScanResults = Optional.empty(); - final long threadScanResultsFieldID = 3L; - Optional> threadScanResults = Optional.empty(); + final long statusFieldID = 0L; + Integer status = null; + final long logContentFieldID = 1L; + byte[] logContent = null; + final long UTCTimeStampFieldID = 2L; + Optional UTCTimeStamp = Optional.empty(); + final long timeSinceBootFieldID = 3L; + Optional timeSinceBoot = Optional.empty(); for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { + if (element.contextTagNum() == statusFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); + status = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); + } else if (element.contextTagNum() == logContentFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + logContent = castingValue.value(byte[].class); } - } else if (element.contextTagNum() == wiFiScanResultsFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - wiFiScanResults = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.NetworkCommissioningClusterWiFiInterfaceScanResultStruct.decodeTlv(elementcastingValue))); + } else if (element.contextTagNum() == UTCTimeStampFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + UTCTimeStamp = Optional.of(castingValue.value(Long.class)); } - } else if (element.contextTagNum() == threadScanResultsFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - threadScanResults = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.NetworkCommissioningClusterThreadInterfaceScanResultStruct.decodeTlv(elementcastingValue))); + } else if (element.contextTagNum() == timeSinceBootFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + timeSinceBoot = Optional.of(castingValue.value(Long.class)); } } } - callback.onSuccess(networkingStatus, debugText, wiFiScanResults, threadScanResults); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce) { - addOrUpdateWiFiNetwork(callback, ssid, credentials, breadcrumb, networkIdentity, clientIdentifier, possessionNonce, 0); - } - - public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback, byte[] ssid, byte[] credentials, Optional breadcrumb, Optional networkIdentity, Optional clientIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long ssidFieldID = 0L; - BaseTLVType ssidtlvValue = new ByteArrayType(ssid); - elements.add(new StructElement(ssidFieldID, ssidtlvValue)); - - final long credentialsFieldID = 1L; - BaseTLVType credentialstlvValue = new ByteArrayType(credentials); - elements.add(new StructElement(credentialsFieldID, credentialstlvValue)); - - final long breadcrumbFieldID = 2L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - - final long networkIdentityFieldID = 3L; - BaseTLVType networkIdentitytlvValue = networkIdentity.map((nonOptionalnetworkIdentity) -> new ByteArrayType(nonOptionalnetworkIdentity)).orElse(new EmptyType()); - elements.add(new StructElement(networkIdentityFieldID, networkIdentitytlvValue)); - - final long clientIdentifierFieldID = 4L; - BaseTLVType clientIdentifiertlvValue = clientIdentifier.map((nonOptionalclientIdentifier) -> new ByteArrayType(nonOptionalclientIdentifier)).orElse(new EmptyType()); - elements.add(new StructElement(clientIdentifierFieldID, clientIdentifiertlvValue)); - - final long possessionNonceFieldID = 5L; - BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); - elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long networkIndexFieldID = 2L; - Optional networkIndex = Optional.empty(); - final long clientIdentityFieldID = 3L; - Optional clientIdentity = Optional.empty(); - final long possessionSignatureFieldID = 4L; - Optional possessionSignature = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == networkIndexFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkIndex = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == clientIdentityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - clientIdentity = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == possessionSignatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - possessionSignature = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback, byte[] operationalDataset, Optional breadcrumb) { - addOrUpdateThreadNetwork(callback, operationalDataset, breadcrumb, 0); - } - - public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback, byte[] operationalDataset, Optional breadcrumb, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - ArrayList elements = new ArrayList<>(); - final long operationalDatasetFieldID = 0L; - BaseTLVType operationalDatasettlvValue = new ByteArrayType(operationalDataset); - elements.add(new StructElement(operationalDatasetFieldID, operationalDatasettlvValue)); - - final long breadcrumbFieldID = 1L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long networkIndexFieldID = 2L; - Optional networkIndex = Optional.empty(); - final long clientIdentityFieldID = 3L; - Optional clientIdentity = Optional.empty(); - final long possessionSignatureFieldID = 4L; - Optional possessionSignature = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == networkIndexFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkIndex = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == clientIdentityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - clientIdentity = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == possessionSignatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - possessionSignature = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void removeNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Optional breadcrumb) { - removeNetwork(callback, networkID, breadcrumb, 0); - } - - public void removeNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Optional breadcrumb, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - final long networkIDFieldID = 0L; - BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); - elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - - final long breadcrumbFieldID = 1L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long networkIndexFieldID = 2L; - Optional networkIndex = Optional.empty(); - final long clientIdentityFieldID = 3L; - Optional clientIdentity = Optional.empty(); - final long possessionSignatureFieldID = 4L; - Optional possessionSignature = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == networkIndexFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkIndex = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == clientIdentityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - clientIdentity = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == possessionSignatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - possessionSignature = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void connectNetwork(ConnectNetworkResponseCallback callback, byte[] networkID, Optional breadcrumb) { - connectNetwork(callback, networkID, breadcrumb, 0); - } - - public void connectNetwork(ConnectNetworkResponseCallback callback, byte[] networkID, Optional breadcrumb, int timedInvokeTimeoutMs) { - final long commandId = 6L; - - ArrayList elements = new ArrayList<>(); - final long networkIDFieldID = 0L; - BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); - elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - - final long breadcrumbFieldID = 1L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long errorValueFieldID = 2L; - @Nullable Long errorValue = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == errorValueFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Int) { - IntType castingValue = element.value(IntType.class); - errorValue = castingValue.value(Long.class); - } - } - } - callback.onSuccess(networkingStatus, debugText, errorValue); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void reorderNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Integer networkIndex, Optional breadcrumb) { - reorderNetwork(callback, networkID, networkIndex, breadcrumb, 0); - } - - public void reorderNetwork(NetworkConfigResponseCallback callback, byte[] networkID, Integer networkIndex, Optional breadcrumb, int timedInvokeTimeoutMs) { - final long commandId = 8L; - - ArrayList elements = new ArrayList<>(); - final long networkIDFieldID = 0L; - BaseTLVType networkIDtlvValue = new ByteArrayType(networkID); - elements.add(new StructElement(networkIDFieldID, networkIDtlvValue)); - - final long networkIndexFieldID = 1L; - BaseTLVType networkIndextlvValue = new UIntType(networkIndex); - elements.add(new StructElement(networkIndexFieldID, networkIndextlvValue)); - - final long breadcrumbFieldID = 2L; - BaseTLVType breadcrumbtlvValue = breadcrumb.map((nonOptionalbreadcrumb) -> new UIntType(nonOptionalbreadcrumb)).orElse(new EmptyType()); - elements.add(new StructElement(breadcrumbFieldID, breadcrumbtlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long networkingStatusFieldID = 0L; - Integer networkingStatus = null; - final long debugTextFieldID = 1L; - Optional debugText = Optional.empty(); - final long networkIndexFieldID = 2L; - Optional networkIndex = Optional.empty(); - final long clientIdentityFieldID = 3L; - Optional clientIdentity = Optional.empty(); - final long possessionSignatureFieldID = 4L; - Optional possessionSignature = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == networkingStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkingStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == debugTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - debugText = Optional.of(castingValue.value(String.class)); - } - } else if (element.contextTagNum() == networkIndexFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - networkIndex = Optional.of(castingValue.value(Integer.class)); - } - } else if (element.contextTagNum() == clientIdentityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - clientIdentity = Optional.of(castingValue.value(byte[].class)); - } - } else if (element.contextTagNum() == possessionSignatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - possessionSignature = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(networkingStatus, debugText, networkIndex, clientIdentity, possessionSignature); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce) { - queryIdentity(callback, keyIdentifier, possessionNonce, 0); - } - - public void queryIdentity(QueryIdentityResponseCallback callback, byte[] keyIdentifier, Optional possessionNonce, int timedInvokeTimeoutMs) { - final long commandId = 9L; - - ArrayList elements = new ArrayList<>(); - final long keyIdentifierFieldID = 0L; - BaseTLVType keyIdentifiertlvValue = new ByteArrayType(keyIdentifier); - elements.add(new StructElement(keyIdentifierFieldID, keyIdentifiertlvValue)); - - final long possessionNonceFieldID = 1L; - BaseTLVType possessionNoncetlvValue = possessionNonce.map((nonOptionalpossessionNonce) -> new ByteArrayType(nonOptionalpossessionNonce)).orElse(new EmptyType()); - elements.add(new StructElement(possessionNonceFieldID, possessionNoncetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long identityFieldID = 0L; - byte[] identity = null; - final long possessionSignatureFieldID = 1L; - Optional possessionSignature = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == identityFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - identity = castingValue.value(byte[].class); - } - } else if (element.contextTagNum() == possessionSignatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - possessionSignature = Optional.of(castingValue.value(byte[].class)); - } - } - } - callback.onSuccess(identity, possessionSignature); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ScanNetworksResponseCallback extends BaseClusterCallback { - void onSuccess(Integer networkingStatus, Optional debugText, Optional> wiFiScanResults, Optional> threadScanResults); - } - - public interface NetworkConfigResponseCallback extends BaseClusterCallback { - void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex, Optional clientIdentity, Optional possessionSignature); - } - - public interface ConnectNetworkResponseCallback extends BaseClusterCallback { - void onSuccess(Integer networkingStatus, Optional debugText, @Nullable Long errorValue); - } - - public interface QueryIdentityResponseCallback extends BaseClusterCallback { - void onSuccess(byte[] identity, Optional possessionSignature); - } - - public interface NetworksAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface LastNetworkingStatusAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface LastNetworkIDAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable byte[] value); - } - - public interface LastConnectErrorValueAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface SupportedWiFiBandsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readMaxNetworksAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORKS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MAX_NETWORKS_ATTRIBUTE_ID, true); - } - - public void subscribeMaxNetworksAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORKS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, MAX_NETWORKS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readNetworksAttribute( - NetworksAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NETWORKS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NETWORKS_ATTRIBUTE_ID, true); - } - - public void subscribeNetworksAttribute( - NetworksAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NETWORKS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, NETWORKS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readScanMaxTimeSecondsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, true); - } - - public void subscribeScanMaxTimeSecondsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SCAN_MAX_TIME_SECONDS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readConnectMaxTimeSecondsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, true); - } - - public void subscribeConnectMaxTimeSecondsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CONNECT_MAX_TIME_SECONDS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInterfaceEnabledAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INTERFACE_ENABLED_ATTRIBUTE_ID, true); - } - - public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { - writeInterfaceEnabledAttribute(callback, value, 0); - } - - public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), INTERFACE_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeInterfaceEnabledAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INTERFACE_ENABLED_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, INTERFACE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readLastNetworkingStatusAttribute( - LastNetworkingStatusAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORKING_STATUS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LAST_NETWORKING_STATUS_ATTRIBUTE_ID, true); - } - - public void subscribeLastNetworkingStatusAttribute( - LastNetworkingStatusAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORKING_STATUS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, LAST_NETWORKING_STATUS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readLastNetworkIDAttribute( - LastNetworkIDAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORK_I_D_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LAST_NETWORK_I_D_ATTRIBUTE_ID, true); - } - - public void subscribeLastNetworkIDAttribute( - LastNetworkIDAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_NETWORK_I_D_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, LAST_NETWORK_I_D_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readLastConnectErrorValueAttribute( - LastConnectErrorValueAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, true); - } - - public void subscribeLastConnectErrorValueAttribute( - LastConnectErrorValueAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, LAST_CONNECT_ERROR_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSupportedWiFiBandsAttribute( - SupportedWiFiBandsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedWiFiBandsAttribute( - SupportedWiFiBandsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SUPPORTED_WI_FI_BANDS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSupportedThreadFeaturesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedThreadFeaturesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SUPPORTED_THREAD_FEATURES_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readThreadVersionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, THREAD_VERSION_ATTRIBUTE_ID, true); - } - - public void subscribeThreadVersionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, THREAD_VERSION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, THREAD_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, EVENT_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, FEATURE_MAP_ATTRIBUTE_ID, true); - } - - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); - } - - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); - } - } - - public static class DiagnosticLogsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 50L; - - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - - public DiagnosticLogsCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void retrieveLogsRequest(RetrieveLogsResponseCallback callback, Integer intent, Integer requestedProtocol, Optional transferFileDesignator) { - retrieveLogsRequest(callback, intent, requestedProtocol, transferFileDesignator, 0); - } - - public void retrieveLogsRequest(RetrieveLogsResponseCallback callback, Integer intent, Integer requestedProtocol, Optional transferFileDesignator, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long intentFieldID = 0L; - BaseTLVType intenttlvValue = new UIntType(intent); - elements.add(new StructElement(intentFieldID, intenttlvValue)); - - final long requestedProtocolFieldID = 1L; - BaseTLVType requestedProtocoltlvValue = new UIntType(requestedProtocol); - elements.add(new StructElement(requestedProtocolFieldID, requestedProtocoltlvValue)); - - final long transferFileDesignatorFieldID = 2L; - BaseTLVType transferFileDesignatortlvValue = transferFileDesignator.map((nonOptionaltransferFileDesignator) -> new StringType(nonOptionaltransferFileDesignator)).orElse(new EmptyType()); - elements.add(new StructElement(transferFileDesignatorFieldID, transferFileDesignatortlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long logContentFieldID = 1L; - byte[] logContent = null; - final long UTCTimeStampFieldID = 2L; - Optional UTCTimeStamp = Optional.empty(); - final long timeSinceBootFieldID = 3L; - Optional timeSinceBoot = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == logContentFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { - ByteArrayType castingValue = element.value(ByteArrayType.class); - logContent = castingValue.value(byte[].class); - } - } else if (element.contextTagNum() == UTCTimeStampFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - UTCTimeStamp = Optional.of(castingValue.value(Long.class)); - } - } else if (element.contextTagNum() == timeSinceBootFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - timeSinceBoot = Optional.of(castingValue.value(Long.class)); - } - } - } - callback.onSuccess(status, logContent, UTCTimeStamp, timeSinceBoot); + callback.onSuccess(status, logContent, UTCTimeStamp, timeSinceBoot); }}, commandId, value, timedInvokeTimeoutMs); } @@ -24881,17 +23907,217 @@ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallb void onSuccess(List value); } - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readMaskAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MASK_ATTRIBUTE_ID, true); + } + + public void subscribeMaskAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readLatchAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LATCH_ATTRIBUTE_ID, true); + } + + public void subscribeLatchAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, LATCH_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATE_ATTRIBUTE_ID, true); + } + + public void subscribeStateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaskAttribute( + public void readFeatureMapAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -24899,94 +24125,137 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MASK_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeMaskAttribute( + public void subscribeFeatureMapAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLatchAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LATCH_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeLatchAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LATCH_ATTRIBUTE_ID); + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LATCH_ATTRIBUTE_ID, minInterval, maxInterval); + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); } + } - public void readStateAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public static class MicrowaveOvenModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 94L; + + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public MicrowaveOvenModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATE_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeStateAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void readCurrentModeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeSupportedAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25140,11 +24409,14 @@ public void onSuccess(byte[] tlv) { } } - public static class MicrowaveOvenModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 94L; + public static class MicrowaveOvenControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 95L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long COOK_TIME_ATTRIBUTE_ID = 1L; + private static final long POWER_SETTING_ATTRIBUTE_ID = 2L; + private static final long MIN_POWER_ATTRIBUTE_ID = 3L; + private static final long MAX_POWER_ATTRIBUTE_ID = 4L; + private static final long POWER_STEP_ATTRIBUTE_ID = 5L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -25152,7 +24424,7 @@ public static class MicrowaveOvenModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public MicrowaveOvenModeCluster(long devicePtr, int endpointId) { + public MicrowaveOvenControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25162,54 +24434,173 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting) { + setCookingParameters(callback, cookMode, cookTime, powerSetting, 0); + } + + public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long cookModeFieldID = 0L; + BaseTLVType cookModetlvValue = cookMode.map((nonOptionalcookMode) -> new UIntType(nonOptionalcookMode)).orElse(new EmptyType()); + elements.add(new StructElement(cookModeFieldID, cookModetlvValue)); + + final long cookTimeFieldID = 1L; + BaseTLVType cookTimetlvValue = cookTime.map((nonOptionalcookTime) -> new UIntType(nonOptionalcookTime)).orElse(new EmptyType()); + elements.add(new StructElement(cookTimeFieldID, cookTimetlvValue)); + + final long powerSettingFieldID = 2L; + BaseTLVType powerSettingtlvValue = powerSetting.map((nonOptionalpowerSetting) -> new UIntType(nonOptionalpowerSetting)).orElse(new EmptyType()); + elements.add(new StructElement(powerSettingFieldID, powerSettingtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd) { + addMoreTime(callback, timeToAdd, 0); + } + + public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long timeToAddFieldID = 0L; + BaseTLVType timeToAddtlvValue = new UIntType(timeToAdd); + elements.add(new StructElement(timeToAddFieldID, timeToAddtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readCookTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, COOK_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeCookTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, COOK_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPowerSettingAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, POWER_SETTING_ATTRIBUTE_ID, true); + } + + public void subscribePowerSettingAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void readMinPowerAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MIN_POWER_ATTRIBUTE_ID, true); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void subscribeMinPowerAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readMaxPowerAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); + }, MAX_POWER_ATTRIBUTE_ID, true); } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void subscribeMaxPowerAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentModeAttribute( + public void readPowerStepAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25217,19 +24608,19 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, POWER_STEP_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( + public void subscribePowerStepAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25383,14 +24774,15 @@ public void onSuccess(byte[] tlv) { } } - public static class MicrowaveOvenControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 95L; + public static class OperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 96L; - private static final long COOK_TIME_ATTRIBUTE_ID = 1L; - private static final long POWER_SETTING_ATTRIBUTE_ID = 2L; - private static final long MIN_POWER_ATTRIBUTE_ID = 3L; - private static final long MAX_POWER_ATTRIBUTE_ID = 4L; - private static final long POWER_STEP_ATTRIBUTE_ID = 5L; + private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; + private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; + private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; + private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; + private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; + private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -25398,7 +24790,7 @@ public static class MicrowaveOvenControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public MicrowaveOvenControlCluster(long devicePtr, int endpointId) { + public OperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25408,54 +24800,134 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting) { - setCookingParameters(callback, cookMode, cookTime, powerSetting, 0); + public void pause(OperationalCommandResponseCallback callback) { + pause(callback, 0); } - public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, int timedInvokeTimeoutMs) { + public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long cookModeFieldID = 0L; - BaseTLVType cookModetlvValue = cookMode.map((nonOptionalcookMode) -> new UIntType(nonOptionalcookMode)).orElse(new EmptyType()); - elements.add(new StructElement(cookModeFieldID, cookModetlvValue)); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } - final long cookTimeFieldID = 1L; - BaseTLVType cookTimetlvValue = cookTime.map((nonOptionalcookTime) -> new UIntType(nonOptionalcookTime)).orElse(new EmptyType()); - elements.add(new StructElement(cookTimeFieldID, cookTimetlvValue)); + public void stop(OperationalCommandResponseCallback callback) { + stop(callback, 0); + } - final long powerSettingFieldID = 2L; - BaseTLVType powerSettingtlvValue = powerSetting.map((nonOptionalpowerSetting) -> new UIntType(nonOptionalpowerSetting)).orElse(new EmptyType()); - elements.add(new StructElement(powerSettingFieldID, powerSettingtlvValue)); + public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); }}, commandId, value, timedInvokeTimeoutMs); } - public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd) { - addMoreTime(callback, timeToAdd, 0); + public void start(OperationalCommandResponseCallback callback) { + start(callback, 0); } - public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 2L; ArrayList elements = new ArrayList<>(); - final long timeToAddFieldID = 0L; - BaseTLVType timeToAddtlvValue = new UIntType(timeToAdd); - elements.add(new StructElement(timeToAddFieldID, timeToAddtlvValue)); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); + }}, commandId, value, timedInvokeTimeoutMs); + } + public void resume(OperationalCommandResponseCallback callback) { + resume(callback, 0); + } + + public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long commandResponseStateFieldID = 0L; + ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == commandResponseStateFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + } + } + } + callback.onSuccess(commandResponseState); }}, commandId, value, timedInvokeTimeoutMs); } + public interface OperationalCommandResponseCallback extends BaseClusterCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); + } + + public interface PhaseListAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); + } + + public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -25472,84 +24944,109 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readCookTimeAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + public void readPhaseListAttribute( + PhaseListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COOK_TIME_ATTRIBUTE_ID, true); + }, PHASE_LIST_ATTRIBUTE_ID, true); } - public void subscribeCookTimeAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COOK_TIME_ATTRIBUTE_ID); + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COOK_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPowerSettingAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POWER_SETTING_ATTRIBUTE_ID, true); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); } - public void subscribePowerSettingAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_POWER_ATTRIBUTE_ID, true); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); } - public void subscribeMinPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxPowerAttribute( + public void readOperationalStateAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25557,44 +25054,44 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_POWER_ATTRIBUTE_ID, true); + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); } - public void subscribeMaxPowerAttribute( + public void subscribeOperationalStateAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPowerStepAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + public void readOperationalErrorAttribute( + OperationalErrorAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POWER_STEP_ATTRIBUTE_ID, true); + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); } - public void subscribePowerStepAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + public void subscribeOperationalErrorAttribute( + OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25748,8 +25245,8 @@ public void onSuccess(byte[] tlv) { } } - public static class OperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 96L; + public static class RvcOperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 97L; private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; @@ -25764,7 +25261,7 @@ public static class OperationalStateCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public OperationalStateCluster(long devicePtr, int endpointId) { + public RvcOperationalStateCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25787,12 +25284,12 @@ public void pause(OperationalCommandResponseCallback callback, int timedInvokeTi @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -25813,12 +25310,12 @@ public void stop(OperationalCommandResponseCallback callback, int timedInvokeTim @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -25839,12 +25336,12 @@ public void start(OperationalCommandResponseCallback callback, int timedInvokeTi @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -25865,12 +25362,12 @@ public void resume(OperationalCommandResponseCallback callback, int timedInvokeT @Override public void onResponse(StructType invokeStructValue) { final long commandResponseStateFieldID = 0L; - ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState = null; + ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == commandResponseStateFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.OperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); } } } @@ -25879,7 +25376,7 @@ public void onResponse(StructType invokeStructValue) { } public interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); } public interface PhaseListAttributeCallback extends BaseAttributeCallback { @@ -25895,132 +25392,307 @@ public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { } public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); + } + + public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readPhaseListAttribute( + PhaseListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PHASE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalErrorAttribute( + OperationalErrorAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); } - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value); - } + public void subscribeOperationalErrorAttribute( + OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPhaseListAttribute( - PhaseListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHASE_LIST_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_PHASE_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateAttribute( + public void readClusterRevisionAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -26028,349 +25700,622 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class ScenesManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 98L; + + private static final long SCENE_COUNT_ATTRIBUTE_ID = 0L; + private static final long CURRENT_SCENE_ATTRIBUTE_ID = 1L; + private static final long CURRENT_GROUP_ATTRIBUTE_ID = 2L; + private static final long SCENE_VALID_ATTRIBUTE_ID = 3L; + private static final long NAME_SUPPORT_ATTRIBUTE_ID = 4L; + private static final long LAST_CONFIGURED_BY_ATTRIBUTE_ID = 5L; + private static final long SCENE_TABLE_SIZE_ATTRIBUTE_ID = 6L; + private static final long FABRIC_SCENE_INFO_ATTRIBUTE_ID = 7L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ScenesManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void addScene(AddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { + addScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); + } + + public void addScene(AddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + + final long sceneNameFieldID = 3L; + BaseTLVType sceneNametlvValue = new StringType(sceneName); + elements.add(new StructElement(sceneNameFieldID, sceneNametlvValue)); + + final long extensionFieldSetsFieldID = 4L; + BaseTLVType extensionFieldSetstlvValue = ArrayType.generateArrayType(extensionFieldSets, (elementextensionFieldSets) -> elementextensionFieldSets.encodeTlv()); + elements.add(new StructElement(extensionFieldSetsFieldID, extensionFieldSetstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(status, groupID, sceneID); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void viewScene(ViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { + viewScene(callback, groupID, sceneID, 0); + } + + public void viewScene(ViewSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; + final long transitionTimeFieldID = 3L; + Optional transitionTime = Optional.empty(); + final long sceneNameFieldID = 4L; + Optional sceneName = Optional.empty(); + final long extensionFieldSetsFieldID = 5L; + Optional> extensionFieldSets = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == transitionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionTime = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == sceneNameFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + sceneName = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == extensionFieldSetsFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + extensionFieldSets = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ScenesManagementClusterExtensionFieldSet.decodeTlv(elementcastingValue))); + } + } + } + callback.onSuccess(status, groupID, sceneID, transitionTime, sceneName, extensionFieldSets); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeOperationalStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID) { + removeScene(callback, groupID, sceneID, 0); } - public void readOperationalErrorAttribute( - OperationalErrorAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + final long commandId = 2L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); - } + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - public void subscribeOperationalErrorAttribute( - OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); + } + } } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + callback.onSuccess(status, groupID, sceneID); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID) { + removeAllScenes(callback, groupID, 0); } - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } + public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + final long commandId = 3L; - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + callback.onSuccess(status, groupID); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID) { + storeScene(callback, groupID, sceneID, 0); } - public void readEventListAttribute( - EventListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + final long commandId = 4L; - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, EVENT_LIST_ATTRIBUTE_ID, true); - } + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - public void subscribeEventListAttribute( - EventListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - subscribeAttribute(new ReportCallbackImpl(callback, path) { + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); + } + } } - }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + callback.onSuccess(status, groupID, sceneID); + }}, commandId, value, timedInvokeTimeoutMs); } - public void readAttributeListAttribute( - AttributeListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { + recallScene(callback, groupID, sceneID, transitionTime, 0); } - public void subscribeAttributeListAttribute( - AttributeListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime, int timedInvokeTimeoutMs) { + final long commandId = 5L; - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - public void readFeatureMapAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - readAttribute(new ReportCallbackImpl(callback, path) { + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = transitionTime != null ? transitionTime.map((nonOptionaltransitionTime) -> new UIntType(nonOptionaltransitionTime)).orElse(new EmptyType()) : new NullType(); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, FEATURE_MAP_ATTRIBUTE_ID, true); + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeFeatureMapAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID) { + getSceneMembership(callback, groupID, 0); } - public void readClusterRevisionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + final long commandId = 6L; - readAttribute(new ReportCallbackImpl(callback, path) { + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long capacityFieldID = 1L; + @Nullable Integer capacity = null; + final long groupIDFieldID = 2L; + Integer groupID = null; + final long sceneListFieldID = 3L; + Optional> sceneList = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == capacityFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + capacity = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneListFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + sceneList = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class))); + } + } } - }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + callback.onSuccess(status, capacity, groupID, sceneList); + }}, commandId, value, timedInvokeTimeoutMs); } - public void subscribeClusterRevisionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + public void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { + enhancedAddScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); } - } - public static class RvcOperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 97L; + public void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, int timedInvokeTimeoutMs) { + final long commandId = 64L; - private static final long PHASE_LIST_ATTRIBUTE_ID = 0L; - private static final long CURRENT_PHASE_ATTRIBUTE_ID = 1L; - private static final long COUNTDOWN_TIME_ATTRIBUTE_ID = 2L; - private static final long OPERATIONAL_STATE_LIST_ATTRIBUTE_ID = 3L; - private static final long OPERATIONAL_STATE_ATTRIBUTE_ID = 4L; - private static final long OPERATIONAL_ERROR_ATTRIBUTE_ID = 5L; - private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; - private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; - private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; - private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; - private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; - private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); - public RvcOperationalStateCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } + final long transitionTimeFieldID = 2L; + BaseTLVType transitionTimetlvValue = new UIntType(transitionTime); + elements.add(new StructElement(transitionTimeFieldID, transitionTimetlvValue)); - public void pause(OperationalCommandResponseCallback callback) { - pause(callback, 0); - } + final long sceneNameFieldID = 3L; + BaseTLVType sceneNametlvValue = new StringType(sceneName); + elements.add(new StructElement(sceneNameFieldID, sceneNametlvValue)); - public void pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; + final long extensionFieldSetsFieldID = 4L; + BaseTLVType extensionFieldSetstlvValue = ArrayType.generateArrayType(extensionFieldSets, (elementextensionFieldSets) -> elementextensionFieldSets.encodeTlv()); + elements.add(new StructElement(extensionFieldSetsFieldID, extensionFieldSetstlvValue)); - ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); } } } - callback.onSuccess(commandResponseState); + callback.onSuccess(status, groupID, sceneID); }}, commandId, value, timedInvokeTimeoutMs); } - public void stop(OperationalCommandResponseCallback callback) { - stop(callback, 0); + public void enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { + enhancedViewScene(callback, groupID, sceneID, 0); } - public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public void enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + final long commandId = 65L; ArrayList elements = new ArrayList<>(); + final long groupIDFieldID = 0L; + BaseTLVType groupIDtlvValue = new UIntType(groupID); + elements.add(new StructElement(groupIDFieldID, groupIDtlvValue)); + + final long sceneIDFieldID = 1L; + BaseTLVType sceneIDtlvValue = new UIntType(sceneID); + elements.add(new StructElement(sceneIDFieldID, sceneIDtlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + final long statusFieldID = 0L; + Integer status = null; + final long groupIDFieldID = 1L; + Integer groupID = null; + final long sceneIDFieldID = 2L; + Integer sceneID = null; + final long transitionTimeFieldID = 3L; + Optional transitionTime = Optional.empty(); + final long sceneNameFieldID = 4L; + Optional sceneName = Optional.empty(); + final long extensionFieldSetsFieldID = 5L; + Optional> extensionFieldSets = Optional.empty(); for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == transitionTimeFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionTime = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == sceneNameFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + sceneName = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == extensionFieldSetsFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + extensionFieldSets = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.ScenesManagementClusterExtensionFieldSet.decodeTlv(elementcastingValue))); } } } - callback.onSuccess(commandResponseState); + callback.onSuccess(status, groupID, sceneID, transitionTime, sceneName, extensionFieldSets); }}, commandId, value, timedInvokeTimeoutMs); } - public void start(OperationalCommandResponseCallback callback) { - start(callback, 0); + public void copyScene(CopySceneResponseCallback callback, Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo) { + copyScene(callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, 0); } - public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; + public void copyScene(CopySceneResponseCallback callback, Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo, int timedInvokeTimeoutMs) { + final long commandId = 66L; + + ArrayList elements = new ArrayList<>(); + final long modeFieldID = 0L; + BaseTLVType modetlvValue = new UIntType(mode); + elements.add(new StructElement(modeFieldID, modetlvValue)); + + final long groupIdentifierFromFieldID = 1L; + BaseTLVType groupIdentifierFromtlvValue = new UIntType(groupIdentifierFrom); + elements.add(new StructElement(groupIdentifierFromFieldID, groupIdentifierFromtlvValue)); + + final long sceneIdentifierFromFieldID = 2L; + BaseTLVType sceneIdentifierFromtlvValue = new UIntType(sceneIdentifierFrom); + elements.add(new StructElement(sceneIdentifierFromFieldID, sceneIdentifierFromtlvValue)); + + final long groupIdentifierToFieldID = 3L; + BaseTLVType groupIdentifierTotlvValue = new UIntType(groupIdentifierTo); + elements.add(new StructElement(groupIdentifierToFieldID, groupIdentifierTotlvValue)); + + final long sceneIdentifierToFieldID = 4L; + BaseTLVType sceneIdentifierTotlvValue = new UIntType(sceneIdentifierTo); + elements.add(new StructElement(sceneIdentifierToFieldID, sceneIdentifierTotlvValue)); - ArrayList elements = new ArrayList<>(); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + final long statusFieldID = 0L; + Integer status = null; + final long groupIdentifierFromFieldID = 1L; + Integer groupIdentifierFrom = null; + final long sceneIdentifierFromFieldID = 2L; + Integer sceneIdentifierFrom = null; for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == groupIdentifierFromFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + groupIdentifierFrom = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == sceneIdentifierFromFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneIdentifierFrom = castingValue.value(Integer.class); } } } - callback.onSuccess(commandResponseState); + callback.onSuccess(status, groupIdentifierFrom, sceneIdentifierFrom); }}, commandId, value, timedInvokeTimeoutMs); } - public void resume(OperationalCommandResponseCallback callback) { - resume(callback, 0); + public interface AddSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public void resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; + public interface ViewSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); + } - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == commandResponseStateFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Struct) { - StructType castingValue = element.value(StructType.class); - commandResponseState = ChipStructs.RvcOperationalStateClusterErrorStateStruct.decodeTlv(castingValue); - } - } - } - callback.onSuccess(commandResponseState); - }}, commandId, value, timedInvokeTimeoutMs); + public interface RemoveSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); + public interface RemoveAllScenesResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID); } - public interface PhaseListAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable List value); + public interface StoreSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface GetSceneMembershipResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList); } - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); + public interface EnhancedAddSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface EnhancedViewSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); } - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); + public interface CopySceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom); + } + + public interface LastConfiguredByAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface FabricSceneInfoAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -26389,109 +26334,109 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readPhaseListAttribute( - PhaseListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void readSceneCountAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_COUNT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHASE_LIST_ATTRIBUTE_ID, true); + }, SCENE_COUNT_ATTRIBUTE_ID, true); } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void subscribeSceneCountAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_COUNT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCENE_COUNT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void readCurrentSceneAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SCENE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_PHASE_ATTRIBUTE_ID, true); + }, CURRENT_SCENE_ATTRIBUTE_ID, true); } - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void subscribeCurrentSceneAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SCENE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_SCENE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void readCurrentGroupAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_GROUP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + }, CURRENT_GROUP_ATTRIBUTE_ID, true); } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void subscribeCurrentGroupAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_GROUP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_GROUP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void readSceneValidAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_VALID_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + }, SCENE_VALID_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void subscribeSceneValidAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_VALID_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, SCENE_VALID_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateAttribute( + public void readNameSupportAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NAME_SUPPORT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -26499,44 +26444,99 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + }, NAME_SUPPORT_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateAttribute( + public void subscribeNameSupportAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NAME_SUPPORT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, NAME_SUPPORT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalErrorAttribute( - OperationalErrorAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void readLastConfiguredByAttribute( + LastConfiguredByAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONFIGURED_BY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + }, LAST_CONFIGURED_BY_ATTRIBUTE_ID, true); } - public void subscribeOperationalErrorAttribute( - OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void subscribeLastConfiguredByAttribute( + LastConfiguredByAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CONFIGURED_BY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + }, LAST_CONFIGURED_BY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSceneTableSizeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_TABLE_SIZE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, true); + } + + public void subscribeSceneTableSizeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_TABLE_SIZE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback) { + readFabricSceneInfoAttributeWithFabricFilter(callback, true); + } + + public void readFabricSceneInfoAttributeWithFabricFilter( + FabricSceneInfoAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, isFabricFiltered); + } + + public void subscribeFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 4374f2e29ee7ad..9e36accf1b129a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -24,249 +24,6 @@ import static chip.devicecontroller.ChipTLVType.*; public class ChipStructs { -public static class ScenesClusterAttributeValuePair { - public Long attributeID; - public Long attributeValue; - private static final long ATTRIBUTE_I_D_ID = 0L; - private static final long ATTRIBUTE_VALUE_ID = 1L; - - public ScenesClusterAttributeValuePair( - Long attributeID, - Long attributeValue - ) { - this.attributeID = attributeID; - this.attributeValue = attributeValue; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(ATTRIBUTE_I_D_ID, new UIntType(attributeID))); - values.add(new StructElement(ATTRIBUTE_VALUE_ID, new UIntType(attributeValue))); - - return new StructType(values); - } - - public static ScenesClusterAttributeValuePair decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - Long attributeID = null; - Long attributeValue = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == ATTRIBUTE_I_D_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - attributeID = castingValue.value(Long.class); - } - } else if (element.contextTagNum() == ATTRIBUTE_VALUE_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - attributeValue = castingValue.value(Long.class); - } - } - } - return new ScenesClusterAttributeValuePair( - attributeID, - attributeValue - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ScenesClusterAttributeValuePair {\n"); - output.append("\tattributeID: "); - output.append(attributeID); - output.append("\n"); - output.append("\tattributeValue: "); - output.append(attributeValue); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} -public static class ScenesClusterExtensionFieldSet { - public Long clusterID; - public ArrayList attributeValueList; - private static final long CLUSTER_I_D_ID = 0L; - private static final long ATTRIBUTE_VALUE_LIST_ID = 1L; - - public ScenesClusterExtensionFieldSet( - Long clusterID, - ArrayList attributeValueList - ) { - this.clusterID = clusterID; - this.attributeValueList = attributeValueList; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(CLUSTER_I_D_ID, new UIntType(clusterID))); - values.add(new StructElement(ATTRIBUTE_VALUE_LIST_ID, ArrayType.generateArrayType(attributeValueList, (elementattributeValueList) -> elementattributeValueList.encodeTlv()))); - - return new StructType(values); - } - - public static ScenesClusterExtensionFieldSet decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - Long clusterID = null; - ArrayList attributeValueList = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == CLUSTER_I_D_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - clusterID = castingValue.value(Long.class); - } - } else if (element.contextTagNum() == ATTRIBUTE_VALUE_LIST_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.Array) { - ArrayType castingValue = element.value(ArrayType.class); - attributeValueList = castingValue.map((elementcastingValue) -> ChipStructs.ScenesClusterAttributeValuePair.decodeTlv(elementcastingValue)); - } - } - } - return new ScenesClusterExtensionFieldSet( - clusterID, - attributeValueList - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ScenesClusterExtensionFieldSet {\n"); - output.append("\tclusterID: "); - output.append(clusterID); - output.append("\n"); - output.append("\tattributeValueList: "); - output.append(attributeValueList); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} -public static class ScenesClusterSceneInfoStruct { - public Integer sceneCount; - public Integer currentScene; - public Integer currentGroup; - public Boolean sceneValid; - public Integer remainingCapacity; - public Integer fabricIndex; - private static final long SCENE_COUNT_ID = 0L; - private static final long CURRENT_SCENE_ID = 1L; - private static final long CURRENT_GROUP_ID = 2L; - private static final long SCENE_VALID_ID = 3L; - private static final long REMAINING_CAPACITY_ID = 4L; - private static final long FABRIC_INDEX_ID = 254L; - - public ScenesClusterSceneInfoStruct( - Integer sceneCount, - Integer currentScene, - Integer currentGroup, - Boolean sceneValid, - Integer remainingCapacity, - Integer fabricIndex - ) { - this.sceneCount = sceneCount; - this.currentScene = currentScene; - this.currentGroup = currentGroup; - this.sceneValid = sceneValid; - this.remainingCapacity = remainingCapacity; - this.fabricIndex = fabricIndex; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(SCENE_COUNT_ID, new UIntType(sceneCount))); - values.add(new StructElement(CURRENT_SCENE_ID, new UIntType(currentScene))); - values.add(new StructElement(CURRENT_GROUP_ID, new UIntType(currentGroup))); - values.add(new StructElement(SCENE_VALID_ID, new BooleanType(sceneValid))); - values.add(new StructElement(REMAINING_CAPACITY_ID, new UIntType(remainingCapacity))); - values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); - - return new StructType(values); - } - - public static ScenesClusterSceneInfoStruct decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - Integer sceneCount = null; - Integer currentScene = null; - Integer currentGroup = null; - Boolean sceneValid = null; - Integer remainingCapacity = null; - Integer fabricIndex = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == SCENE_COUNT_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - sceneCount = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == CURRENT_SCENE_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - currentScene = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == CURRENT_GROUP_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - currentGroup = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == SCENE_VALID_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { - BooleanType castingValue = element.value(BooleanType.class); - sceneValid = castingValue.value(Boolean.class); - } - } else if (element.contextTagNum() == REMAINING_CAPACITY_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - remainingCapacity = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == FABRIC_INDEX_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - fabricIndex = castingValue.value(Integer.class); - } - } - } - return new ScenesClusterSceneInfoStruct( - sceneCount, - currentScene, - currentGroup, - sceneValid, - remainingCapacity, - fabricIndex - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("ScenesClusterSceneInfoStruct {\n"); - output.append("\tsceneCount: "); - output.append(sceneCount); - output.append("\n"); - output.append("\tcurrentScene: "); - output.append(currentScene); - output.append("\n"); - output.append("\tcurrentGroup: "); - output.append(currentGroup); - output.append("\n"); - output.append("\tsceneValid: "); - output.append(sceneValid); - output.append("\n"); - output.append("\tremainingCapacity: "); - output.append(remainingCapacity); - output.append("\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} public static class DescriptorClusterDeviceTypeStruct { public Long deviceType; public Integer revision; @@ -5306,6 +5063,249 @@ public String toString() { return output.toString(); } } +public static class ScenesManagementClusterAttributeValuePair { + public Long attributeID; + public Long attributeValue; + private static final long ATTRIBUTE_I_D_ID = 0L; + private static final long ATTRIBUTE_VALUE_ID = 1L; + + public ScenesManagementClusterAttributeValuePair( + Long attributeID, + Long attributeValue + ) { + this.attributeID = attributeID; + this.attributeValue = attributeValue; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ATTRIBUTE_I_D_ID, new UIntType(attributeID))); + values.add(new StructElement(ATTRIBUTE_VALUE_ID, new UIntType(attributeValue))); + + return new StructType(values); + } + + public static ScenesManagementClusterAttributeValuePair decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long attributeID = null; + Long attributeValue = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ATTRIBUTE_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + attributeID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ATTRIBUTE_VALUE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + attributeValue = castingValue.value(Long.class); + } + } + } + return new ScenesManagementClusterAttributeValuePair( + attributeID, + attributeValue + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesManagementClusterAttributeValuePair {\n"); + output.append("\tattributeID: "); + output.append(attributeID); + output.append("\n"); + output.append("\tattributeValue: "); + output.append(attributeValue); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ScenesManagementClusterExtensionFieldSet { + public Long clusterID; + public ArrayList attributeValueList; + private static final long CLUSTER_I_D_ID = 0L; + private static final long ATTRIBUTE_VALUE_LIST_ID = 1L; + + public ScenesManagementClusterExtensionFieldSet( + Long clusterID, + ArrayList attributeValueList + ) { + this.clusterID = clusterID; + this.attributeValueList = attributeValueList; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CLUSTER_I_D_ID, new UIntType(clusterID))); + values.add(new StructElement(ATTRIBUTE_VALUE_LIST_ID, ArrayType.generateArrayType(attributeValueList, (elementattributeValueList) -> elementattributeValueList.encodeTlv()))); + + return new StructType(values); + } + + public static ScenesManagementClusterExtensionFieldSet decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Long clusterID = null; + ArrayList attributeValueList = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CLUSTER_I_D_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + clusterID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == ATTRIBUTE_VALUE_LIST_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + attributeValueList = castingValue.map((elementcastingValue) -> ChipStructs.ScenesManagementClusterAttributeValuePair.decodeTlv(elementcastingValue)); + } + } + } + return new ScenesManagementClusterExtensionFieldSet( + clusterID, + attributeValueList + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesManagementClusterExtensionFieldSet {\n"); + output.append("\tclusterID: "); + output.append(clusterID); + output.append("\n"); + output.append("\tattributeValueList: "); + output.append(attributeValueList); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ScenesManagementClusterSceneInfoStruct { + public Integer sceneCount; + public Integer currentScene; + public Integer currentGroup; + public Boolean sceneValid; + public Integer remainingCapacity; + public Integer fabricIndex; + private static final long SCENE_COUNT_ID = 0L; + private static final long CURRENT_SCENE_ID = 1L; + private static final long CURRENT_GROUP_ID = 2L; + private static final long SCENE_VALID_ID = 3L; + private static final long REMAINING_CAPACITY_ID = 4L; + private static final long FABRIC_INDEX_ID = 254L; + + public ScenesManagementClusterSceneInfoStruct( + Integer sceneCount, + Integer currentScene, + Integer currentGroup, + Boolean sceneValid, + Integer remainingCapacity, + Integer fabricIndex + ) { + this.sceneCount = sceneCount; + this.currentScene = currentScene; + this.currentGroup = currentGroup; + this.sceneValid = sceneValid; + this.remainingCapacity = remainingCapacity; + this.fabricIndex = fabricIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SCENE_COUNT_ID, new UIntType(sceneCount))); + values.add(new StructElement(CURRENT_SCENE_ID, new UIntType(currentScene))); + values.add(new StructElement(CURRENT_GROUP_ID, new UIntType(currentGroup))); + values.add(new StructElement(SCENE_VALID_ID, new BooleanType(sceneValid))); + values.add(new StructElement(REMAINING_CAPACITY_ID, new UIntType(remainingCapacity))); + values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); + + return new StructType(values); + } + + public static ScenesManagementClusterSceneInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sceneCount = null; + Integer currentScene = null; + Integer currentGroup = null; + Boolean sceneValid = null; + Integer remainingCapacity = null; + Integer fabricIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SCENE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneCount = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_SCENE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentScene = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_GROUP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentGroup = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SCENE_VALID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + sceneValid = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == REMAINING_CAPACITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + remainingCapacity = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fabricIndex = castingValue.value(Integer.class); + } + } + } + return new ScenesManagementClusterSceneInfoStruct( + sceneCount, + currentScene, + currentGroup, + sceneValid, + remainingCapacity, + fabricIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesManagementClusterSceneInfoStruct {\n"); + output.append("\tsceneCount: "); + output.append(sceneCount); + output.append("\n"); + output.append("\tcurrentScene: "); + output.append(currentScene); + output.append("\n"); + output.append("\tcurrentGroup: "); + output.append(currentGroup); + output.append("\n"); + output.append("\tsceneValid: "); + output.append(sceneValid); + output.append("\n"); + output.append("\tremainingCapacity: "); + output.append(remainingCapacity); + output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class HepaFilterMonitoringClusterReplacementProductStruct { public Integer productIdentifierType; public String productIdentifierValue; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index a6a447c64bc67c..41f10d3711f857 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -34,9 +34,6 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == Groups.ID) { return new Groups(); } - if (clusterId == Scenes.ID) { - return new Scenes(); - } if (clusterId == OnOff.ID) { return new OnOff(); } @@ -211,6 +208,9 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == RvcOperationalState.ID) { return new RvcOperationalState(); } + if (clusterId == ScenesManagement.ID) { + return new ScenesManagement(); + } if (clusterId == HepaFilterMonitoring.ID) { return new HepaFilterMonitoring(); } @@ -698,21 +698,18 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class Scenes implements BaseCluster { - public static final long ID = 5L; + public static class OnOff implements BaseCluster { + public static final long ID = 6L; public long getID() { return ID; } public enum Attribute { - SceneCount(0L), - CurrentScene(1L), - CurrentGroup(2L), - SceneValid(3L), - NameSupport(4L), - LastConfiguredBy(5L), - SceneTableSize(6L), - FabricSceneInfo(7L), + OnOff(0L), + GlobalSceneControl(16384L), + OnTime(16385L), + OffWaitTime(16386L), + StartUpOnOff(16387L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -759,16 +756,12 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - AddScene(0L), - ViewScene(1L), - RemoveScene(2L), - RemoveAllScenes(3L), - StoreScene(4L), - RecallScene(5L), - GetSceneMembership(6L), - EnhancedAddScene(64L), - EnhancedViewScene(65L), - CopyScene(66L),; + Off(0L), + On(1L), + Toggle(2L), + OffWithEffect(64L), + OnWithRecallGlobalScene(65L), + OnWithTimedOff(66L),; private final long id; Command(long id) { this.id = id; @@ -786,170 +779,34 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum AddSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),SceneName(3),ExtensionFieldSets(4),; - private final int id; - AddSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static AddSceneCommandField value(int id) throws NoSuchFieldError { - for (AddSceneCommandField field : AddSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum ViewSceneCommandField {GroupID(0),SceneID(1),; - private final int id; - ViewSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static ViewSceneCommandField value(int id) throws NoSuchFieldError { - for (ViewSceneCommandField field : ViewSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum RemoveSceneCommandField {GroupID(0),SceneID(1),; - private final int id; - RemoveSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static RemoveSceneCommandField value(int id) throws NoSuchFieldError { - for (RemoveSceneCommandField field : RemoveSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum RemoveAllScenesCommandField {GroupID(0),; - private final int id; - RemoveAllScenesCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static RemoveAllScenesCommandField value(int id) throws NoSuchFieldError { - for (RemoveAllScenesCommandField field : RemoveAllScenesCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum StoreSceneCommandField {GroupID(0),SceneID(1),; - private final int id; - StoreSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static StoreSceneCommandField value(int id) throws NoSuchFieldError { - for (StoreSceneCommandField field : StoreSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum RecallSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),; - private final int id; - RecallSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static RecallSceneCommandField value(int id) throws NoSuchFieldError { - for (RecallSceneCommandField field : RecallSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum GetSceneMembershipCommandField {GroupID(0),; - private final int id; - GetSceneMembershipCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static GetSceneMembershipCommandField value(int id) throws NoSuchFieldError { - for (GetSceneMembershipCommandField field : GetSceneMembershipCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum EnhancedAddSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),SceneName(3),ExtensionFieldSets(4),; - private final int id; - EnhancedAddSceneCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static EnhancedAddSceneCommandField value(int id) throws NoSuchFieldError { - for (EnhancedAddSceneCommandField field : EnhancedAddSceneCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum EnhancedViewSceneCommandField {GroupID(0),SceneID(1),; + }public enum OffWithEffectCommandField {EffectIdentifier(0),EffectVariant(1),; private final int id; - EnhancedViewSceneCommandField(int id) { + OffWithEffectCommandField(int id) { this.id = id; } public int getID() { return id; } - public static EnhancedViewSceneCommandField value(int id) throws NoSuchFieldError { - for (EnhancedViewSceneCommandField field : EnhancedViewSceneCommandField.values()) { + public static OffWithEffectCommandField value(int id) throws NoSuchFieldError { + for (OffWithEffectCommandField field : OffWithEffectCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum CopySceneCommandField {Mode(0),GroupIdentifierFrom(1),SceneIdentifierFrom(2),GroupIdentifierTo(3),SceneIdentifierTo(4),; + }public enum OnWithTimedOffCommandField {OnOffControl(0),OnTime(1),OffWaitTime(2),; private final int id; - CopySceneCommandField(int id) { + OnWithTimedOffCommandField(int id) { this.id = id; } public int getID() { return id; } - public static CopySceneCommandField value(int id) throws NoSuchFieldError { - for (CopySceneCommandField field : CopySceneCommandField.values()) { + public static OnWithTimedOffCommandField value(int id) throws NoSuchFieldError { + for (OnWithTimedOffCommandField field : OnWithTimedOffCommandField.values()) { if (field.getID() == id) { return field; } @@ -986,18 +843,15 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class OnOff implements BaseCluster { - public static final long ID = 6L; + public static class OnOffSwitchConfiguration implements BaseCluster { + public static final long ID = 7L; public long getID() { return ID; } public enum Attribute { - OnOff(0L), - GlobalSceneControl(16384L), - OnTime(16385L), - OffWaitTime(16386L), - StartUpOnOff(16387L), + SwitchType(0L), + SwitchActions(16L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -1043,13 +897,7 @@ public static Event value(long id) throws NoSuchFieldError { } } - public enum Command { - Off(0L), - On(1L), - Toggle(2L), - OffWithEffect(64L), - OnWithRecallGlobalScene(65L), - OnWithTimedOff(66L),; + public enum Command {; private final long id; Command(long id) { this.id = id; @@ -1067,41 +915,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum OffWithEffectCommandField {EffectIdentifier(0),EffectVariant(1),; - private final int id; - OffWithEffectCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static OffWithEffectCommandField value(int id) throws NoSuchFieldError { - for (OffWithEffectCommandField field : OffWithEffectCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }public enum OnWithTimedOffCommandField {OnOffControl(0),OnTime(1),OffWaitTime(2),; - private final int id; - OnWithTimedOffCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static OnWithTimedOffCommandField value(int id) throws NoSuchFieldError { - for (OnWithTimedOffCommandField field : OnWithTimedOffCommandField.values()) { - if (field.getID() == id) { - return field; - } - } - throw new NoSuchFieldError(); - } - }@Override + }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); } @@ -1131,110 +945,8 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class OnOffSwitchConfiguration implements BaseCluster { - public static final long ID = 7L; - public long getID() { - return ID; - } - - public enum Attribute { - SwitchType(0L), - SwitchActions(16L), - GeneratedCommandList(65528L), - AcceptedCommandList(65529L), - EventList(65530L), - AttributeList(65531L), - FeatureMap(65532L), - ClusterRevision(65533L),; - private final long id; - Attribute(long id) { - this.id = id; - } - - public long getID() { - return id; - } - - public static Attribute value(long id) throws NoSuchFieldError { - for (Attribute attribute : Attribute.values()) { - if (attribute.getID() == id) { - return attribute; - } - } - throw new NoSuchFieldError(); - } - } - - public enum Event {; - private final long id; - Event(long id) { - this.id = id; - } - - public long getID() { - return id; - } - - public static Event value(long id) throws NoSuchFieldError { - for (Event event : Event.values()) { - if (event.getID() == id) { - return event; - } - } - throw new NoSuchFieldError(); - } - } - - public enum Command {; - private final long id; - Command(long id) { - this.id = id; - } - - public long getID() { - return id; - } - - public static Command value(long id) throws NoSuchFieldError { - for (Command command : Command.values()) { - if (command.getID() == id) { - return command; - } - } - throw new NoSuchFieldError(); - } - }@Override - public String getAttributeName(long id) throws NoSuchFieldError { - return Attribute.value(id).toString(); - } - - @Override - public String getEventName(long id) throws NoSuchFieldError { - return Event.value(id).toString(); - } - - @Override - public String getCommandName(long id) throws NoSuchFieldError { - return Command.value(id).toString(); - } - - @Override - public long getAttributeID(String name) throws IllegalArgumentException { - return Attribute.valueOf(name).getID(); - } - - @Override - public long getEventID(String name) throws IllegalArgumentException { - return Event.valueOf(name).getID(); - } - - @Override - public long getCommandID(String name) throws IllegalArgumentException { - return Command.valueOf(name).getID(); - } - } - public static class LevelControl implements BaseCluster { - public static final long ID = 8L; + public static class LevelControl implements BaseCluster { + public static final long ID = 8L; public long getID() { return ID; } @@ -8559,6 +8271,294 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } + public static class ScenesManagement implements BaseCluster { + public static final long ID = 98L; + public long getID() { + return ID; + } + + public enum Attribute { + SceneCount(0L), + CurrentScene(1L), + CurrentGroup(2L), + SceneValid(3L), + NameSupport(4L), + LastConfiguredBy(5L), + SceneTableSize(6L), + FabricSceneInfo(7L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + AddScene(0L), + ViewScene(1L), + RemoveScene(2L), + RemoveAllScenes(3L), + StoreScene(4L), + RecallScene(5L), + GetSceneMembership(6L), + EnhancedAddScene(64L), + EnhancedViewScene(65L), + CopyScene(66L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum AddSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),SceneName(3),ExtensionFieldSets(4),; + private final int id; + AddSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AddSceneCommandField value(int id) throws NoSuchFieldError { + for (AddSceneCommandField field : AddSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ViewSceneCommandField {GroupID(0),SceneID(1),; + private final int id; + ViewSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ViewSceneCommandField value(int id) throws NoSuchFieldError { + for (ViewSceneCommandField field : ViewSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveSceneCommandField {GroupID(0),SceneID(1),; + private final int id; + RemoveSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveSceneCommandField value(int id) throws NoSuchFieldError { + for (RemoveSceneCommandField field : RemoveSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RemoveAllScenesCommandField {GroupID(0),; + private final int id; + RemoveAllScenesCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RemoveAllScenesCommandField value(int id) throws NoSuchFieldError { + for (RemoveAllScenesCommandField field : RemoveAllScenesCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum StoreSceneCommandField {GroupID(0),SceneID(1),; + private final int id; + StoreSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static StoreSceneCommandField value(int id) throws NoSuchFieldError { + for (StoreSceneCommandField field : StoreSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum RecallSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),; + private final int id; + RecallSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static RecallSceneCommandField value(int id) throws NoSuchFieldError { + for (RecallSceneCommandField field : RecallSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum GetSceneMembershipCommandField {GroupID(0),; + private final int id; + GetSceneMembershipCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static GetSceneMembershipCommandField value(int id) throws NoSuchFieldError { + for (GetSceneMembershipCommandField field : GetSceneMembershipCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EnhancedAddSceneCommandField {GroupID(0),SceneID(1),TransitionTime(2),SceneName(3),ExtensionFieldSets(4),; + private final int id; + EnhancedAddSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnhancedAddSceneCommandField value(int id) throws NoSuchFieldError { + for (EnhancedAddSceneCommandField field : EnhancedAddSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EnhancedViewSceneCommandField {GroupID(0),SceneID(1),; + private final int id; + EnhancedViewSceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EnhancedViewSceneCommandField value(int id) throws NoSuchFieldError { + for (EnhancedViewSceneCommandField field : EnhancedViewSceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum CopySceneCommandField {Mode(0),GroupIdentifierFrom(1),SceneIdentifierFrom(2),GroupIdentifierTo(3),SceneIdentifierTo(4),; + private final int id; + CopySceneCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static CopySceneCommandField value(int id) throws NoSuchFieldError { + for (CopySceneCommandField field : CopySceneCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } public static class HepaFilterMonitoring implements BaseCluster { public static final long ID = 113L; public long getID() { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 06097ad7878a8c..227f5e072f447d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -480,8 +480,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedScenesClusterAddSceneResponseCallback implements ChipClusters.ScenesCluster.AddSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffClusterStartUpOnOffAttributeCallback implements ChipClusters.OnOffCluster.StartUpOnOffAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -489,25 +488,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterViewSceneResponseCallback implements ChipClusters.ScenesCluster.ViewSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffClusterGeneratedCommandListAttributeCallback implements ChipClusters.OnOffCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -515,32 +509,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); - CommandResponseInfo transitionTimeResponseValue = new CommandResponseInfo("transitionTime", "Optional"); - responseValues.put(transitionTimeResponseValue, transitionTime); - CommandResponseInfo sceneNameResponseValue = new CommandResponseInfo("sceneName", "Optional"); - responseValues.put(sceneNameResponseValue, sceneName); - // extensionFieldSets: ExtensionFieldSet - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterRemoveSceneResponseCallback implements ChipClusters.ScenesCluster.RemoveSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffClusterAcceptedCommandListAttributeCallback implements ChipClusters.OnOffCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -548,25 +530,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterRemoveAllScenesResponseCallback implements ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffClusterEventListAttributeCallback implements ChipClusters.OnOffCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -574,23 +551,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterStoreSceneResponseCallback implements ChipClusters.ScenesCluster.StoreSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffClusterAttributeListAttributeCallback implements ChipClusters.OnOffCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -598,25 +572,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterGetSceneMembershipResponseCallback implements ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffSwitchConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -624,28 +593,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "Integer"); - responseValues.put(capacityResponseValue, capacity); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - // sceneList: int8u - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterEnhancedAddSceneResponseCallback implements ChipClusters.ScenesCluster.EnhancedAddSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffSwitchConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -653,25 +614,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterEnhancedViewSceneResponseCallback implements ChipClusters.ScenesCluster.EnhancedViewSceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffSwitchConfigurationClusterEventListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -679,32 +635,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); - responseValues.put(groupIDResponseValue, groupID); - CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); - responseValues.put(sceneIDResponseValue, sceneID); - CommandResponseInfo transitionTimeResponseValue = new CommandResponseInfo("transitionTime", "Optional"); - responseValues.put(transitionTimeResponseValue, transitionTime); - CommandResponseInfo sceneNameResponseValue = new CommandResponseInfo("sceneName", "Optional"); - responseValues.put(sceneNameResponseValue, sceneName); - // extensionFieldSets: ExtensionFieldSet - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterCopySceneResponseCallback implements ChipClusters.ScenesCluster.CopySceneResponseCallback, DelegatedClusterCallback { + public static class DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -712,24 +656,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo groupIdentifierFromResponseValue = new CommandResponseInfo("groupIdentifierFrom", "Integer"); - responseValues.put(groupIdentifierFromResponseValue, groupIdentifierFrom); - CommandResponseInfo sceneIdentifierFromResponseValue = new CommandResponseInfo("sceneIdentifierFrom", "Integer"); - responseValues.put(sceneIdentifierFromResponseValue, sceneIdentifierFrom); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedScenesClusterLastConfiguredByAttributeCallback implements ChipClusters.ScenesCluster.LastConfiguredByAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedLevelControlClusterCurrentLevelAttributeCallback implements ChipClusters.LevelControlCluster.CurrentLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -737,9 +677,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -750,7 +690,7 @@ public void onError(Exception ex) { } } - public static class DelegatedScenesClusterFabricSceneInfoAttributeCallback implements ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterOnLevelAttributeCallback implements ChipClusters.LevelControlCluster.OnLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -758,10 +698,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -771,7 +711,7 @@ public void onError(Exception ex) { } } - public static class DelegatedScenesClusterGeneratedCommandListAttributeCallback implements ChipClusters.ScenesCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterOnTransitionTimeAttributeCallback implements ChipClusters.LevelControlCluster.OnTransitionTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -779,10 +719,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -792,7 +732,7 @@ public void onError(Exception ex) { } } - public static class DelegatedScenesClusterAcceptedCommandListAttributeCallback implements ChipClusters.ScenesCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterOffTransitionTimeAttributeCallback implements ChipClusters.LevelControlCluster.OffTransitionTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -800,10 +740,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -813,7 +753,7 @@ public void onError(Exception ex) { } } - public static class DelegatedScenesClusterEventListAttributeCallback implements ChipClusters.ScenesCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterDefaultMoveRateAttributeCallback implements ChipClusters.LevelControlCluster.DefaultMoveRateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -821,10 +761,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -834,7 +774,7 @@ public void onError(Exception ex) { } } - public static class DelegatedScenesClusterAttributeListAttributeCallback implements ChipClusters.ScenesCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterStartUpCurrentLevelAttributeCallback implements ChipClusters.LevelControlCluster.StartUpCurrentLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -842,10 +782,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -855,7 +795,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffClusterStartUpOnOffAttributeCallback implements ChipClusters.OnOffCluster.StartUpOnOffAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.LevelControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -863,10 +803,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -876,7 +816,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffClusterGeneratedCommandListAttributeCallback implements ChipClusters.OnOffCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.LevelControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -897,7 +837,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffClusterAcceptedCommandListAttributeCallback implements ChipClusters.OnOffCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterEventListAttributeCallback implements ChipClusters.LevelControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -918,7 +858,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffClusterEventListAttributeCallback implements ChipClusters.OnOffCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLevelControlClusterAttributeListAttributeCallback implements ChipClusters.LevelControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -939,7 +879,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffClusterAttributeListAttributeCallback implements ChipClusters.OnOffCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBinaryInputBasicClusterGeneratedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -960,7 +900,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffSwitchConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBinaryInputBasicClusterAcceptedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -981,7 +921,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffSwitchConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBinaryInputBasicClusterEventListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1002,7 +942,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffSwitchConfigurationClusterEventListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBinaryInputBasicClusterAttributeListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1023,7 +963,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPulseWidthModulationClusterGeneratedCommandListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1044,7 +984,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterCurrentLevelAttributeCallback implements ChipClusters.LevelControlCluster.CurrentLevelAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPulseWidthModulationClusterAcceptedCommandListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1052,10 +992,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1065,7 +1005,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterOnLevelAttributeCallback implements ChipClusters.LevelControlCluster.OnLevelAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPulseWidthModulationClusterEventListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1073,10 +1013,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1086,7 +1026,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterOnTransitionTimeAttributeCallback implements ChipClusters.LevelControlCluster.OnTransitionTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPulseWidthModulationClusterAttributeListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1094,10 +1034,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1107,7 +1047,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterOffTransitionTimeAttributeCallback implements ChipClusters.LevelControlCluster.OffTransitionTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterDeviceTypeListAttributeCallback implements ChipClusters.DescriptorCluster.DeviceTypeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1115,10 +1055,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1128,7 +1068,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterDefaultMoveRateAttributeCallback implements ChipClusters.LevelControlCluster.DefaultMoveRateAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterServerListAttributeCallback implements ChipClusters.DescriptorCluster.ServerListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1136,10 +1076,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1149,7 +1089,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterStartUpCurrentLevelAttributeCallback implements ChipClusters.LevelControlCluster.StartUpCurrentLevelAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterClientListAttributeCallback implements ChipClusters.DescriptorCluster.ClientListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1157,10 +1097,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1170,7 +1110,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.LevelControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterPartsListAttributeCallback implements ChipClusters.DescriptorCluster.PartsListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1178,9 +1118,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1191,7 +1131,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.LevelControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterTagListAttributeCallback implements ChipClusters.DescriptorCluster.TagListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1199,9 +1139,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1212,7 +1152,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterEventListAttributeCallback implements ChipClusters.LevelControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterGeneratedCommandListAttributeCallback implements ChipClusters.DescriptorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1233,7 +1173,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLevelControlClusterAttributeListAttributeCallback implements ChipClusters.LevelControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterAcceptedCommandListAttributeCallback implements ChipClusters.DescriptorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1254,7 +1194,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBinaryInputBasicClusterGeneratedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterEventListAttributeCallback implements ChipClusters.DescriptorCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1275,7 +1215,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBinaryInputBasicClusterAcceptedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDescriptorClusterAttributeListAttributeCallback implements ChipClusters.DescriptorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1296,7 +1236,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBinaryInputBasicClusterEventListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBindingClusterBindingAttributeCallback implements ChipClusters.BindingCluster.BindingAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1304,9 +1244,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1317,7 +1257,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBinaryInputBasicClusterAttributeListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBindingClusterGeneratedCommandListAttributeCallback implements ChipClusters.BindingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1338,7 +1278,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPulseWidthModulationClusterGeneratedCommandListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBindingClusterAcceptedCommandListAttributeCallback implements ChipClusters.BindingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1359,7 +1299,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPulseWidthModulationClusterAcceptedCommandListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBindingClusterEventListAttributeCallback implements ChipClusters.BindingCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1380,7 +1320,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPulseWidthModulationClusterEventListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBindingClusterAttributeListAttributeCallback implements ChipClusters.BindingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1401,7 +1341,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPulseWidthModulationClusterAttributeListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterAclAttributeCallback implements ChipClusters.AccessControlCluster.AclAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1409,9 +1349,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1422,7 +1362,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterDeviceTypeListAttributeCallback implements ChipClusters.DescriptorCluster.DeviceTypeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterExtensionAttributeCallback implements ChipClusters.AccessControlCluster.ExtensionAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1430,9 +1370,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1443,7 +1383,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterServerListAttributeCallback implements ChipClusters.DescriptorCluster.ServerListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.AccessControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1464,7 +1404,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterClientListAttributeCallback implements ChipClusters.DescriptorCluster.ClientListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.AccessControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1485,7 +1425,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterPartsListAttributeCallback implements ChipClusters.DescriptorCluster.PartsListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterEventListAttributeCallback implements ChipClusters.AccessControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1493,9 +1433,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1506,7 +1446,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterTagListAttributeCallback implements ChipClusters.DescriptorCluster.TagListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAccessControlClusterAttributeListAttributeCallback implements ChipClusters.AccessControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1514,9 +1454,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1527,7 +1467,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterGeneratedCommandListAttributeCallback implements ChipClusters.DescriptorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterActionListAttributeCallback implements ChipClusters.ActionsCluster.ActionListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1535,9 +1475,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1548,7 +1488,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterAcceptedCommandListAttributeCallback implements ChipClusters.DescriptorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterEndpointListsAttributeCallback implements ChipClusters.ActionsCluster.EndpointListsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1556,9 +1496,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1569,7 +1509,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterEventListAttributeCallback implements ChipClusters.DescriptorCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActionsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1590,7 +1530,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDescriptorClusterAttributeListAttributeCallback implements ChipClusters.DescriptorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActionsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1611,7 +1551,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterBindingAttributeCallback implements ChipClusters.BindingCluster.BindingAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterEventListAttributeCallback implements ChipClusters.ActionsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1619,9 +1559,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1632,7 +1572,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterGeneratedCommandListAttributeCallback implements ChipClusters.BindingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActionsClusterAttributeListAttributeCallback implements ChipClusters.ActionsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1653,7 +1593,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterAcceptedCommandListAttributeCallback implements ChipClusters.BindingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterCapabilityMinimaAttributeCallback implements ChipClusters.BasicInformationCluster.CapabilityMinimaAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1661,10 +1601,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.BasicInformationClusterCapabilityMinimaStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BasicInformationClusterCapabilityMinimaStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -1674,7 +1614,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterEventListAttributeCallback implements ChipClusters.BindingCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterProductAppearanceAttributeCallback implements ChipClusters.BasicInformationCluster.ProductAppearanceAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1682,10 +1622,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.BasicInformationClusterProductAppearanceStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BasicInformationClusterProductAppearanceStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -1695,7 +1635,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBindingClusterAttributeListAttributeCallback implements ChipClusters.BindingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BasicInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1716,7 +1656,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterAclAttributeCallback implements ChipClusters.AccessControlCluster.AclAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BasicInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1724,9 +1664,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1737,7 +1677,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterExtensionAttributeCallback implements ChipClusters.AccessControlCluster.ExtensionAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterEventListAttributeCallback implements ChipClusters.BasicInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1745,9 +1685,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1758,7 +1698,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.AccessControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBasicInformationClusterAttributeListAttributeCallback implements ChipClusters.BasicInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1779,7 +1719,67 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.AccessControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOtaSoftwareUpdateProviderClusterQueryImageResponseCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo delayedActionTimeResponseValue = new CommandResponseInfo("delayedActionTime", "Optional"); + responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + CommandResponseInfo imageURIResponseValue = new CommandResponseInfo("imageURI", "Optional"); + responseValues.put(imageURIResponseValue, imageURI); + CommandResponseInfo softwareVersionResponseValue = new CommandResponseInfo("softwareVersion", "Optional"); + responseValues.put(softwareVersionResponseValue, softwareVersion); + CommandResponseInfo softwareVersionStringResponseValue = new CommandResponseInfo("softwareVersionString", "Optional"); + responseValues.put(softwareVersionStringResponseValue, softwareVersionString); + CommandResponseInfo updateTokenResponseValue = new CommandResponseInfo("updateToken", "Optional"); + responseValues.put(updateTokenResponseValue, updateToken); + CommandResponseInfo userConsentNeededResponseValue = new CommandResponseInfo("userConsentNeeded", "Optional"); + responseValues.put(userConsentNeededResponseValue, userConsentNeeded); + CommandResponseInfo metadataForRequestorResponseValue = new CommandResponseInfo("metadataForRequestor", "Optional"); + responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer action, Long delayedActionTime) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "Integer"); + responseValues.put(actionResponseValue, action); + CommandResponseInfo delayedActionTimeResponseValue = new CommandResponseInfo("delayedActionTime", "Long"); + responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedOtaSoftwareUpdateProviderClusterGeneratedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1800,7 +1800,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterEventListAttributeCallback implements ChipClusters.AccessControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateProviderClusterAcceptedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1821,7 +1821,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAccessControlClusterAttributeListAttributeCallback implements ChipClusters.AccessControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateProviderClusterEventListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1842,7 +1842,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterActionListAttributeCallback implements ChipClusters.ActionsCluster.ActionListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateProviderClusterAttributeListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1850,9 +1850,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1863,7 +1863,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterEndpointListsAttributeCallback implements ChipClusters.ActionsCluster.EndpointListsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.DefaultOTAProvidersAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1871,9 +1871,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1884,7 +1884,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActionsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterUpdateStateProgressAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.UpdateStateProgressAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1892,10 +1892,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -1905,7 +1905,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActionsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterGeneratedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1926,7 +1926,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterEventListAttributeCallback implements ChipClusters.ActionsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterAcceptedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1947,7 +1947,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActionsClusterAttributeListAttributeCallback implements ChipClusters.ActionsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterEventListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1968,7 +1968,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterCapabilityMinimaAttributeCallback implements ChipClusters.BasicInformationCluster.CapabilityMinimaAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1976,10 +1976,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.BasicInformationClusterCapabilityMinimaStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BasicInformationClusterCapabilityMinimaStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -1989,7 +1989,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterProductAppearanceAttributeCallback implements ChipClusters.BasicInformationCluster.ProductAppearanceAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.SupportedLocalesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -1997,10 +1997,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.BasicInformationClusterProductAppearanceStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BasicInformationClusterProductAppearanceStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2010,7 +2010,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BasicInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLocalizationConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2031,7 +2031,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BasicInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLocalizationConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2052,7 +2052,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterEventListAttributeCallback implements ChipClusters.BasicInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLocalizationConfigurationClusterEventListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2073,7 +2073,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBasicInformationClusterAttributeListAttributeCallback implements ChipClusters.BasicInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLocalizationConfigurationClusterAttributeListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2094,8 +2094,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOtaSoftwareUpdateProviderClusterQueryImageResponseCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.QueryImageResponseCallback, DelegatedClusterCallback { + public static class DelegatedTimeFormatLocalizationClusterSupportedCalendarTypesAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.SupportedCalendarTypesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2103,35 +2102,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo delayedActionTimeResponseValue = new CommandResponseInfo("delayedActionTime", "Optional"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); - CommandResponseInfo imageURIResponseValue = new CommandResponseInfo("imageURI", "Optional"); - responseValues.put(imageURIResponseValue, imageURI); - CommandResponseInfo softwareVersionResponseValue = new CommandResponseInfo("softwareVersion", "Optional"); - responseValues.put(softwareVersionResponseValue, softwareVersion); - CommandResponseInfo softwareVersionStringResponseValue = new CommandResponseInfo("softwareVersionString", "Optional"); - responseValues.put(softwareVersionStringResponseValue, softwareVersionString); - CommandResponseInfo updateTokenResponseValue = new CommandResponseInfo("updateToken", "Optional"); - responseValues.put(updateTokenResponseValue, updateToken); - CommandResponseInfo userConsentNeededResponseValue = new CommandResponseInfo("userConsentNeeded", "Optional"); - responseValues.put(userConsentNeededResponseValue, userConsentNeeded); - CommandResponseInfo metadataForRequestorResponseValue = new CommandResponseInfo("metadataForRequestor", "Optional"); - responseValues.put(metadataForRequestorResponseValue, metadataForRequestor); - callback.onSuccess(responseValues); - } + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.ApplyUpdateResponseCallback, DelegatedClusterCallback { + public static class DelegatedTimeFormatLocalizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2139,22 +2123,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer action, Long delayedActionTime) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo actionResponseValue = new CommandResponseInfo("action", "Integer"); - responseValues.put(actionResponseValue, action); - CommandResponseInfo delayedActionTimeResponseValue = new CommandResponseInfo("delayedActionTime", "Long"); - responseValues.put(delayedActionTimeResponseValue, delayedActionTime); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOtaSoftwareUpdateProviderClusterGeneratedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedTimeFormatLocalizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2175,7 +2157,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateProviderClusterAcceptedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimeFormatLocalizationClusterEventListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2196,7 +2178,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateProviderClusterEventListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimeFormatLocalizationClusterAttributeListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2217,7 +2199,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateProviderClusterAttributeListAttributeCallback implements ChipClusters.OtaSoftwareUpdateProviderCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitLocalizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.UnitLocalizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2238,7 +2220,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterDefaultOTAProvidersAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.DefaultOTAProvidersAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitLocalizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.UnitLocalizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2246,9 +2228,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2259,7 +2241,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterUpdateStateProgressAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.UpdateStateProgressAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitLocalizationClusterEventListAttributeCallback implements ChipClusters.UnitLocalizationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2267,10 +2249,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2280,7 +2262,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterGeneratedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitLocalizationClusterAttributeListAttributeCallback implements ChipClusters.UnitLocalizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2301,7 +2283,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterAcceptedCommandListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceConfigurationClusterSourcesAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2309,9 +2291,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2322,7 +2304,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterEventListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2343,7 +2325,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOtaSoftwareUpdateRequestorClusterAttributeListAttributeCallback implements ChipClusters.OtaSoftwareUpdateRequestorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2364,7 +2346,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLocalizationConfigurationClusterSupportedLocalesAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.SupportedLocalesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceConfigurationClusterEventListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2372,9 +2354,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2385,7 +2367,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLocalizationConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceConfigurationClusterAttributeListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2406,7 +2388,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLocalizationConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterWiredAssessedInputVoltageAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedInputVoltageAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2414,10 +2396,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2427,7 +2409,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLocalizationConfigurationClusterEventListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterWiredAssessedInputFrequencyAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedInputFrequencyAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2435,10 +2417,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2448,7 +2430,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLocalizationConfigurationClusterAttributeListAttributeCallback implements ChipClusters.LocalizationConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterWiredAssessedCurrentAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2456,10 +2438,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2469,7 +2451,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeFormatLocalizationClusterSupportedCalendarTypesAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.SupportedCalendarTypesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterActiveWiredFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveWiredFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2490,7 +2472,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeFormatLocalizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterBatVoltageAttributeCallback implements ChipClusters.PowerSourceCluster.BatVoltageAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2498,10 +2480,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2511,7 +2493,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeFormatLocalizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterBatPercentRemainingAttributeCallback implements ChipClusters.PowerSourceCluster.BatPercentRemainingAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2519,10 +2501,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2532,7 +2514,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeFormatLocalizationClusterEventListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterBatTimeRemainingAttributeCallback implements ChipClusters.PowerSourceCluster.BatTimeRemainingAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2540,10 +2522,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2553,7 +2535,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeFormatLocalizationClusterAttributeListAttributeCallback implements ChipClusters.TimeFormatLocalizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterActiveBatFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveBatFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2561,9 +2543,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2574,7 +2556,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitLocalizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.UnitLocalizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterBatTimeToFullChargeAttributeCallback implements ChipClusters.PowerSourceCluster.BatTimeToFullChargeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2582,10 +2564,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2595,7 +2577,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitLocalizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.UnitLocalizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterBatChargingCurrentAttributeCallback implements ChipClusters.PowerSourceCluster.BatChargingCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2603,10 +2585,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2616,7 +2598,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitLocalizationClusterEventListAttributeCallback implements ChipClusters.UnitLocalizationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterActiveBatChargeFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveBatChargeFaultsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2624,9 +2606,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2637,7 +2619,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitLocalizationClusterAttributeListAttributeCallback implements ChipClusters.UnitLocalizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterEndpointListAttributeCallback implements ChipClusters.PowerSourceCluster.EndpointListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2645,9 +2627,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2658,7 +2640,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceConfigurationClusterSourcesAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.SourcesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterGeneratedCommandListAttributeCallback implements ChipClusters.PowerSourceCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2666,9 +2648,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2679,7 +2661,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterAcceptedCommandListAttributeCallback implements ChipClusters.PowerSourceCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2700,7 +2682,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterEventListAttributeCallback implements ChipClusters.PowerSourceCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2721,7 +2703,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceConfigurationClusterEventListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPowerSourceClusterAttributeListAttributeCallback implements ChipClusters.PowerSourceCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2742,7 +2724,8 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceConfigurationClusterAttributeListAttributeCallback implements ChipClusters.PowerSourceConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedGeneralCommissioningClusterArmFailSafeResponseCallback implements ChipClusters.GeneralCommissioningCluster.ArmFailSafeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2750,20 +2733,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); + responseValues.put(errorCodeResponseValue, errorCode); + CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); + responseValues.put(debugTextResponseValue, debugText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedPowerSourceClusterWiredAssessedInputVoltageAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedInputVoltageAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterSetRegulatoryConfigResponseCallback implements ChipClusters.GeneralCommissioningCluster.SetRegulatoryConfigResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2771,20 +2757,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); + responseValues.put(errorCodeResponseValue, errorCode); + CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); + responseValues.put(debugTextResponseValue, debugText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedPowerSourceClusterWiredAssessedInputFrequencyAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedInputFrequencyAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterCommissioningCompleteResponseCallback implements ChipClusters.GeneralCommissioningCluster.CommissioningCompleteResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2792,20 +2781,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Integer errorCode, String debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); + responseValues.put(errorCodeResponseValue, errorCode); + CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); + responseValues.put(debugTextResponseValue, debugText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedPowerSourceClusterWiredAssessedCurrentAttributeCallback implements ChipClusters.PowerSourceCluster.WiredAssessedCurrentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterBasicCommissioningInfoAttributeCallback implements ChipClusters.GeneralCommissioningCluster.BasicCommissioningInfoAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2813,9 +2804,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -2826,7 +2817,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceClusterActiveWiredFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveWiredFaultsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterGeneratedCommandListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2834,9 +2825,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2847,7 +2838,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceClusterBatVoltageAttributeCallback implements ChipClusters.PowerSourceCluster.BatVoltageAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterAcceptedCommandListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2855,10 +2846,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2868,7 +2859,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceClusterBatPercentRemainingAttributeCallback implements ChipClusters.PowerSourceCluster.BatPercentRemainingAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterEventListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2876,10 +2867,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -2889,7 +2880,7 @@ public void onError(Exception ex) { } } - public static class DelegatedPowerSourceClusterBatTimeRemainingAttributeCallback implements ChipClusters.PowerSourceCluster.BatTimeRemainingAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGeneralCommissioningClusterAttributeListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -2897,373 +2888,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterActiveBatFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveBatFaultsAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterBatTimeToFullChargeAttributeCallback implements ChipClusters.PowerSourceCluster.BatTimeToFullChargeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Long value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterBatChargingCurrentAttributeCallback implements ChipClusters.PowerSourceCluster.BatChargingCurrentAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Long value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterActiveBatChargeFaultsAttributeCallback implements ChipClusters.PowerSourceCluster.ActiveBatChargeFaultsAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterEndpointListAttributeCallback implements ChipClusters.PowerSourceCluster.EndpointListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterGeneratedCommandListAttributeCallback implements ChipClusters.PowerSourceCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterAcceptedCommandListAttributeCallback implements ChipClusters.PowerSourceCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterEventListAttributeCallback implements ChipClusters.PowerSourceCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedPowerSourceClusterAttributeListAttributeCallback implements ChipClusters.PowerSourceCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - - public static class DelegatedGeneralCommissioningClusterArmFailSafeResponseCallback implements ChipClusters.GeneralCommissioningCluster.ArmFailSafeResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer errorCode, String debugText) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedGeneralCommissioningClusterSetRegulatoryConfigResponseCallback implements ChipClusters.GeneralCommissioningCluster.SetRegulatoryConfigResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer errorCode, String debugText) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedGeneralCommissioningClusterCommissioningCompleteResponseCallback implements ChipClusters.GeneralCommissioningCluster.CommissioningCompleteResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer errorCode, String debugText) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo errorCodeResponseValue = new CommandResponseInfo("errorCode", "Integer"); - responseValues.put(errorCodeResponseValue, errorCode); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "String"); - responseValues.put(debugTextResponseValue, debugText); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedGeneralCommissioningClusterBasicCommissioningInfoAttributeCallback implements ChipClusters.GeneralCommissioningCluster.BasicCommissioningInfoAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedGeneralCommissioningClusterGeneratedCommandListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedGeneralCommissioningClusterAcceptedCommandListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedGeneralCommissioningClusterEventListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedGeneralCommissioningClusterAttributeListAttributeCallback implements ChipClusters.GeneralCommissioningCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); @@ -5022,9 +4647,219 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterTrustedTimeSourceAttributeCallback implements ChipClusters.TimeSynchronizationCluster.TrustedTimeSourceAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.TimeSynchronizationClusterTrustedTimeSourceStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.TimeSynchronizationClusterTrustedTimeSourceStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterDefaultNTPAttributeCallback implements ChipClusters.TimeSynchronizationCluster.DefaultNTPAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable String value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterTimeZoneAttributeCallback implements ChipClusters.TimeSynchronizationCluster.TimeZoneAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterDSTOffsetAttributeCallback implements ChipClusters.TimeSynchronizationCluster.DSTOffsetAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterLocalTimeAttributeCallback implements ChipClusters.TimeSynchronizationCluster.LocalTimeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterEventListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTimeSynchronizationClusterAttributeListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedBridgedDeviceBasicInformationClusterProductAppearanceAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.ProductAppearanceAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.BridgedDeviceBasicInformationClusterProductAppearanceStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BridgedDeviceBasicInformationClusterProductAppearanceStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -5035,7 +4870,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterTrustedTimeSourceAttributeCallback implements ChipClusters.TimeSynchronizationCluster.TrustedTimeSourceAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBridgedDeviceBasicInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5043,10 +4878,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.TimeSynchronizationClusterTrustedTimeSourceStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.TimeSynchronizationClusterTrustedTimeSourceStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5056,7 +4891,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterDefaultNTPAttributeCallback implements ChipClusters.TimeSynchronizationCluster.DefaultNTPAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBridgedDeviceBasicInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5064,10 +4899,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable String value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5077,7 +4912,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterTimeZoneAttributeCallback implements ChipClusters.TimeSynchronizationCluster.TimeZoneAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBridgedDeviceBasicInformationClusterEventListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5085,9 +4920,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5098,7 +4933,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterDSTOffsetAttributeCallback implements ChipClusters.TimeSynchronizationCluster.DSTOffsetAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBridgedDeviceBasicInformationClusterAttributeListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5106,9 +4941,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5119,7 +4954,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterLocalTimeAttributeCallback implements ChipClusters.TimeSynchronizationCluster.LocalTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSwitchClusterGeneratedCommandListAttributeCallback implements ChipClusters.SwitchCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5127,10 +4962,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5140,7 +4975,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSwitchClusterAcceptedCommandListAttributeCallback implements ChipClusters.SwitchCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5161,7 +4996,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSwitchClusterEventListAttributeCallback implements ChipClusters.SwitchCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5182,7 +5017,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterEventListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSwitchClusterAttributeListAttributeCallback implements ChipClusters.SwitchCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5203,7 +5038,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimeSynchronizationClusterAttributeListAttributeCallback implements ChipClusters.TimeSynchronizationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterAdminFabricIndexAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AdminFabricIndexAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5211,10 +5046,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -5224,7 +5059,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBridgedDeviceBasicInformationClusterProductAppearanceAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.ProductAppearanceAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterAdminVendorIdAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AdminVendorIdAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5232,9 +5067,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.BridgedDeviceBasicInformationClusterProductAppearanceStruct value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.BridgedDeviceBasicInformationClusterProductAppearanceStruct"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -5245,7 +5080,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBridgedDeviceBasicInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterGeneratedCommandListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5266,7 +5101,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBridgedDeviceBasicInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterAcceptedCommandListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5287,7 +5122,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBridgedDeviceBasicInformationClusterEventListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterEventListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5308,7 +5143,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBridgedDeviceBasicInformationClusterAttributeListAttributeCallback implements ChipClusters.BridgedDeviceBasicInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAdministratorCommissioningClusterAttributeListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5329,7 +5164,8 @@ public void onError(Exception ex) { } } - public static class DelegatedSwitchClusterGeneratedCommandListAttributeCallback implements ChipClusters.SwitchCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOperationalCredentialsClusterAttestationResponseCallback implements ChipClusters.OperationalCredentialsCluster.AttestationResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5337,20 +5173,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(byte[] attestationElements, byte[] attestationSignature) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo attestationElementsResponseValue = new CommandResponseInfo("attestationElements", "byte[]"); + responseValues.put(attestationElementsResponseValue, attestationElements); + CommandResponseInfo attestationSignatureResponseValue = new CommandResponseInfo("attestationSignature", "byte[]"); + responseValues.put(attestationSignatureResponseValue, attestationSignature); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedSwitchClusterAcceptedCommandListAttributeCallback implements ChipClusters.SwitchCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterCertificateChainResponseCallback implements ChipClusters.OperationalCredentialsCluster.CertificateChainResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5358,20 +5197,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(byte[] certificate) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo certificateResponseValue = new CommandResponseInfo("certificate", "byte[]"); + responseValues.put(certificateResponseValue, certificate); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedSwitchClusterEventListAttributeCallback implements ChipClusters.SwitchCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterCSRResponseCallback implements ChipClusters.OperationalCredentialsCluster.CSRResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5379,20 +5219,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(byte[] NOCSRElements, byte[] attestationSignature) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo NOCSRElementsResponseValue = new CommandResponseInfo("NOCSRElements", "byte[]"); + responseValues.put(NOCSRElementsResponseValue, NOCSRElements); + CommandResponseInfo attestationSignatureResponseValue = new CommandResponseInfo("attestationSignature", "byte[]"); + responseValues.put(attestationSignatureResponseValue, attestationSignature); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedSwitchClusterAttributeListAttributeCallback implements ChipClusters.SwitchCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterNOCResponseCallback implements ChipClusters.OperationalCredentialsCluster.NOCResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5400,9 +5243,34 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer statusCode, Optional fabricIndex, Optional debugText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + CommandResponseInfo statusCodeResponseValue = new CommandResponseInfo("statusCode", "Integer"); + responseValues.put(statusCodeResponseValue, statusCode); + CommandResponseInfo fabricIndexResponseValue = new CommandResponseInfo("fabricIndex", "Optional"); + responseValues.put(fabricIndexResponseValue, fabricIndex); + CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "Optional"); + responseValues.put(debugTextResponseValue, debugText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedOperationalCredentialsClusterNOCsAttributeCallback implements ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5413,7 +5281,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterAdminFabricIndexAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AdminFabricIndexAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterFabricsAttributeCallback implements ChipClusters.OperationalCredentialsCluster.FabricsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5421,10 +5289,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5434,7 +5302,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterAdminVendorIdAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AdminVendorIdAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterTrustedRootCertificatesAttributeCallback implements ChipClusters.OperationalCredentialsCluster.TrustedRootCertificatesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5442,10 +5310,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5455,7 +5323,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterGeneratedCommandListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5476,7 +5344,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterAcceptedCommandListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5497,7 +5365,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterEventListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterEventListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5518,7 +5386,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAdministratorCommissioningClusterAttributeListAttributeCallback implements ChipClusters.AdministratorCommissioningCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalCredentialsClusterAttributeListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5540,7 +5408,7 @@ public void onError(Exception ex) { } - public static class DelegatedOperationalCredentialsClusterAttestationResponseCallback implements ChipClusters.OperationalCredentialsCluster.AttestationResponseCallback, DelegatedClusterCallback { + public static class DelegatedGroupKeyManagementClusterKeySetReadResponseCallback implements ChipClusters.GroupKeyManagementCluster.KeySetReadResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5548,13 +5416,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] attestationElements, byte[] attestationSignature) { + public void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo attestationElementsResponseValue = new CommandResponseInfo("attestationElements", "byte[]"); - responseValues.put(attestationElementsResponseValue, attestationElements); - CommandResponseInfo attestationSignatureResponseValue = new CommandResponseInfo("attestationSignature", "byte[]"); - responseValues.put(attestationSignatureResponseValue, attestationSignature); + // groupKeySet: Struct GroupKeySetStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @@ -5564,7 +5430,7 @@ public void onError(Exception error) { } } - public static class DelegatedOperationalCredentialsClusterCertificateChainResponseCallback implements ChipClusters.OperationalCredentialsCluster.CertificateChainResponseCallback, DelegatedClusterCallback { + public static class DelegatedGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback implements ChipClusters.GroupKeyManagementCluster.KeySetReadAllIndicesResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5572,11 +5438,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] certificate) { + public void onSuccess(ArrayList groupKeySetIDs) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo certificateResponseValue = new CommandResponseInfo("certificate", "byte[]"); - responseValues.put(certificateResponseValue, certificate); + // groupKeySetIDs: int16u + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @@ -5585,8 +5452,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - - public static class DelegatedOperationalCredentialsClusterCSRResponseCallback implements ChipClusters.OperationalCredentialsCluster.CSRResponseCallback, DelegatedClusterCallback { + public static class DelegatedGroupKeyManagementClusterGroupKeyMapAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupKeyMapAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5594,23 +5460,41 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] NOCSRElements, byte[] attestationSignature) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } - CommandResponseInfo NOCSRElementsResponseValue = new CommandResponseInfo("NOCSRElements", "byte[]"); - responseValues.put(NOCSRElementsResponseValue, NOCSRElements); - CommandResponseInfo attestationSignatureResponseValue = new CommandResponseInfo("attestationSignature", "byte[]"); - responseValues.put(attestationSignatureResponseValue, attestationSignature); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedGroupKeyManagementClusterGroupTableAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupTableAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOperationalCredentialsClusterNOCResponseCallback implements ChipClusters.OperationalCredentialsCluster.NOCResponseCallback, DelegatedClusterCallback { + public static class DelegatedGroupKeyManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5618,24 +5502,41 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer statusCode, Optional fabricIndex, Optional debugText) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } - CommandResponseInfo statusCodeResponseValue = new CommandResponseInfo("statusCode", "Integer"); - responseValues.put(statusCodeResponseValue, statusCode); - CommandResponseInfo fabricIndexResponseValue = new CommandResponseInfo("fabricIndex", "Optional"); - responseValues.put(fabricIndexResponseValue, fabricIndex); - CommandResponseInfo debugTextResponseValue = new CommandResponseInfo("debugText", "Optional"); - responseValues.put(debugTextResponseValue, debugText); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedGroupKeyManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOperationalCredentialsClusterNOCsAttributeCallback implements ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedGroupKeyManagementClusterEventListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5643,9 +5544,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5656,7 +5557,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterFabricsAttributeCallback implements ChipClusters.OperationalCredentialsCluster.FabricsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedGroupKeyManagementClusterAttributeListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5664,9 +5565,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5677,7 +5578,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterTrustedRootCertificatesAttributeCallback implements ChipClusters.OperationalCredentialsCluster.TrustedRootCertificatesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFixedLabelClusterLabelListAttributeCallback implements ChipClusters.FixedLabelCluster.LabelListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5685,9 +5586,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5698,7 +5599,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFixedLabelClusterGeneratedCommandListAttributeCallback implements ChipClusters.FixedLabelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5719,7 +5620,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFixedLabelClusterAcceptedCommandListAttributeCallback implements ChipClusters.FixedLabelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5740,7 +5641,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterEventListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFixedLabelClusterEventListAttributeCallback implements ChipClusters.FixedLabelCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5761,7 +5662,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalCredentialsClusterAttributeListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedFixedLabelClusterAttributeListAttributeCallback implements ChipClusters.FixedLabelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5782,8 +5683,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedGroupKeyManagementClusterKeySetReadResponseCallback implements ChipClusters.GroupKeyManagementCluster.KeySetReadResponseCallback, DelegatedClusterCallback { + public static class DelegatedUserLabelClusterLabelListAttributeCallback implements ChipClusters.UserLabelCluster.LabelListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5791,21 +5691,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // groupKeySet: Struct GroupKeySetStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback implements ChipClusters.GroupKeyManagementCluster.KeySetReadAllIndicesResponseCallback, DelegatedClusterCallback { + public static class DelegatedUserLabelClusterGeneratedCommandListAttributeCallback implements ChipClusters.UserLabelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5813,21 +5712,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ArrayList groupKeySetIDs) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // groupKeySetIDs: int16u - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedGroupKeyManagementClusterGroupKeyMapAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupKeyMapAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedUserLabelClusterAcceptedCommandListAttributeCallback implements ChipClusters.UserLabelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5835,9 +5733,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5848,7 +5746,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeyManagementClusterGroupTableAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GroupTableAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUserLabelClusterEventListAttributeCallback implements ChipClusters.UserLabelCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5856,9 +5754,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5869,7 +5767,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeyManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUserLabelClusterAttributeListAttributeCallback implements ChipClusters.UserLabelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5890,7 +5788,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeyManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5911,7 +5809,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeyManagementClusterEventListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5932,7 +5830,7 @@ public void onError(Exception ex) { } } - public static class DelegatedGroupKeyManagementClusterAttributeListAttributeCallback implements ChipClusters.GroupKeyManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyConfigurationClusterEventListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5953,7 +5851,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFixedLabelClusterLabelListAttributeCallback implements ChipClusters.FixedLabelCluster.LabelListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyConfigurationClusterAttributeListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5961,9 +5859,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -5974,7 +5872,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFixedLabelClusterGeneratedCommandListAttributeCallback implements ChipClusters.FixedLabelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyDiscoveryClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -5995,7 +5893,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFixedLabelClusterAcceptedCommandListAttributeCallback implements ChipClusters.FixedLabelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyDiscoveryClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6016,7 +5914,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFixedLabelClusterEventListAttributeCallback implements ChipClusters.FixedLabelCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyDiscoveryClusterEventListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6037,7 +5935,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFixedLabelClusterAttributeListAttributeCallback implements ChipClusters.FixedLabelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyDiscoveryClusterAttributeListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6058,7 +5956,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUserLabelClusterLabelListAttributeCallback implements ChipClusters.UserLabelCluster.LabelListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyValidClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyValidCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6066,9 +5964,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6079,7 +5977,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUserLabelClusterGeneratedCommandListAttributeCallback implements ChipClusters.UserLabelCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyValidClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyValidCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6100,7 +5998,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUserLabelClusterAcceptedCommandListAttributeCallback implements ChipClusters.UserLabelCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyValidClusterEventListAttributeCallback implements ChipClusters.ProxyValidCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6121,7 +6019,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUserLabelClusterEventListAttributeCallback implements ChipClusters.UserLabelCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedProxyValidClusterAttributeListAttributeCallback implements ChipClusters.ProxyValidCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6142,7 +6040,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUserLabelClusterAttributeListAttributeCallback implements ChipClusters.UserLabelCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6163,7 +6061,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6184,7 +6082,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateClusterEventListAttributeCallback implements ChipClusters.BooleanStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6205,7 +6103,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyConfigurationClusterEventListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanStateClusterAttributeListAttributeCallback implements ChipClusters.BooleanStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6226,7 +6124,8 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyConfigurationClusterAttributeListAttributeCallback implements ChipClusters.ProxyConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedIcdManagementClusterRegisterClientResponseCallback implements ChipClusters.IcdManagementCluster.RegisterClientResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6234,20 +6133,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Long ICDCounter) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo ICDCounterResponseValue = new CommandResponseInfo("ICDCounter", "Long"); + responseValues.put(ICDCounterResponseValue, ICDCounter); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedProxyDiscoveryClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterStayActiveResponseCallback implements ChipClusters.IcdManagementCluster.StayActiveResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6255,20 +6155,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Long promisedActiveDuration) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo promisedActiveDurationResponseValue = new CommandResponseInfo("promisedActiveDuration", "Long"); + responseValues.put(promisedActiveDurationResponseValue, promisedActiveDuration); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedProxyDiscoveryClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterRegisteredClientsAttributeCallback implements ChipClusters.IcdManagementCluster.RegisteredClientsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6276,9 +6176,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6289,7 +6189,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyDiscoveryClusterEventListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6310,7 +6210,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyDiscoveryClusterAttributeListAttributeCallback implements ChipClusters.ProxyDiscoveryCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6331,7 +6231,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyValidClusterGeneratedCommandListAttributeCallback implements ChipClusters.ProxyValidCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterEventListAttributeCallback implements ChipClusters.IcdManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6352,7 +6252,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyValidClusterAcceptedCommandListAttributeCallback implements ChipClusters.ProxyValidCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedIcdManagementClusterAttributeListAttributeCallback implements ChipClusters.IcdManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6373,7 +6273,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyValidClusterEventListAttributeCallback implements ChipClusters.ProxyValidCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimerCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6394,7 +6294,7 @@ public void onError(Exception ex) { } } - public static class DelegatedProxyValidClusterAttributeListAttributeCallback implements ChipClusters.ProxyValidCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimerCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6415,7 +6315,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterEventListAttributeCallback implements ChipClusters.TimerCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6436,7 +6336,7 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTimerClusterAttributeListAttributeCallback implements ChipClusters.TimerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6457,7 +6357,8 @@ public void onError(Exception ex) { } } - public static class DelegatedBooleanStateClusterEventListAttributeCallback implements ChipClusters.BooleanStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6465,20 +6366,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedBooleanStateClusterAttributeListAttributeCallback implements ChipClusters.BooleanStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6486,9 +6387,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6499,8 +6400,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedIcdManagementClusterRegisterClientResponseCallback implements ChipClusters.IcdManagementCluster.RegisterClientResponseCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6508,21 +6408,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Long ICDCounter) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo ICDCounterResponseValue = new CommandResponseInfo("ICDCounter", "Long"); - responseValues.put(ICDCounterResponseValue, ICDCounter); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedIcdManagementClusterStayActiveResponseCallback implements ChipClusters.IcdManagementCluster.StayActiveResponseCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6530,20 +6429,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Long promisedActiveDuration) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo promisedActiveDurationResponseValue = new CommandResponseInfo("promisedActiveDuration", "Long"); - responseValues.put(promisedActiveDurationResponseValue, promisedActiveDuration); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedIcdManagementClusterRegisteredClientsAttributeCallback implements ChipClusters.IcdManagementCluster.RegisteredClientsAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOvenCavityOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6551,9 +6450,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6564,7 +6463,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6572,10 +6471,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6585,7 +6484,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.IcdManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6606,7 +6505,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterEventListAttributeCallback implements ChipClusters.IcdManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6627,7 +6526,7 @@ public void onError(Exception ex) { } } - public static class DelegatedIcdManagementClusterAttributeListAttributeCallback implements ChipClusters.IcdManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterEventListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6648,7 +6547,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimerClusterGeneratedCommandListAttributeCallback implements ChipClusters.TimerCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenCavityOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6669,7 +6568,31 @@ public void onError(Exception ex) { } } - public static class DelegatedTimerClusterAcceptedCommandListAttributeCallback implements ChipClusters.TimerCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOvenModeClusterChangeToModeResponseCallback implements ChipClusters.OvenModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional statusText) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.OvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6677,9 +6600,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6690,7 +6613,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimerClusterEventListAttributeCallback implements ChipClusters.TimerCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterStartUpModeAttributeCallback implements ChipClusters.OvenModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6698,10 +6621,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6711,7 +6634,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTimerClusterAttributeListAttributeCallback implements ChipClusters.TimerCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterOnModeAttributeCallback implements ChipClusters.OvenModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6719,10 +6642,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6732,8 +6655,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOvenCavityOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6741,20 +6663,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOvenCavityOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6762,9 +6684,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6775,7 +6697,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterEventListAttributeCallback implements ChipClusters.OvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6783,10 +6705,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6796,7 +6718,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOvenModeClusterAttributeListAttributeCallback implements ChipClusters.OvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6804,10 +6726,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6817,7 +6739,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterSupportedDrynessLevelsAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SupportedDrynessLevelsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6825,9 +6747,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6838,7 +6760,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterSelectedDrynessLevelAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SelectedDrynessLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6846,9 +6768,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OvenCavityOperationalStateClusterErrorStateStruct"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -6859,7 +6781,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6880,7 +6802,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6901,7 +6823,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterEventListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterEventListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6922,7 +6844,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenCavityOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OvenCavityOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryDryerControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6943,8 +6865,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOvenModeClusterChangeToModeResponseCallback implements ChipClusters.OvenModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6952,22 +6873,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional statusText) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.OvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6975,9 +6894,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -6988,7 +6907,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterStartUpModeAttributeCallback implements ChipClusters.OvenModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7009,7 +6928,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterOnModeAttributeCallback implements ChipClusters.OvenModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7030,7 +6949,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7051,7 +6970,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7072,7 +6991,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterEventListAttributeCallback implements ChipClusters.OvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7093,7 +7012,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOvenModeClusterAttributeListAttributeCallback implements ChipClusters.OvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7114,7 +7033,8 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterSupportedDrynessLevelsAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SupportedDrynessLevelsAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedLaundryWasherModeClusterChangeToModeResponseCallback implements ChipClusters.LaundryWasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7122,9 +7042,32 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedLaundryWasherModeClusterSupportedModesAttributeCallback implements ChipClusters.LaundryWasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7135,7 +7078,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterSelectedDrynessLevelAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.SelectedDrynessLevelAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7156,7 +7099,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7164,10 +7107,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7177,7 +7120,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7198,7 +7141,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterEventListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7219,7 +7162,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryDryerControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryDryerControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterEventListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7240,7 +7183,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherModeClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7248,10 +7191,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7261,7 +7204,8 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterSupportedModesAttributeCallback implements ChipClusters.ModeSelectCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7269,20 +7213,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedModeSelectClusterStartUpModeAttributeCallback implements ChipClusters.ModeSelectCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterSupportedModesAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7290,10 +7236,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7303,7 +7249,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterOnModeAttributeCallback implements ChipClusters.ModeSelectCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7324,7 +7270,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterGeneratedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7332,10 +7278,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -7345,7 +7291,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterAcceptedCommandListAttributeCallback implements ChipClusters.ModeSelectCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7366,7 +7312,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterEventListAttributeCallback implements ChipClusters.ModeSelectCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7387,7 +7333,7 @@ public void onError(Exception ex) { } } - public static class DelegatedModeSelectClusterAttributeListAttributeCallback implements ChipClusters.ModeSelectCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7408,8 +7354,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedLaundryWasherModeClusterChangeToModeResponseCallback implements ChipClusters.LaundryWasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7417,22 +7362,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional statusText) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedLaundryWasherModeClusterSupportedModesAttributeCallback implements ChipClusters.LaundryWasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7440,9 +7383,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7453,7 +7396,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterStartUpModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7474,7 +7417,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterOnModeAttributeCallback implements ChipClusters.LaundryWasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7482,10 +7425,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7495,7 +7438,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7516,7 +7459,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7537,7 +7480,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterEventListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7558,7 +7501,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherModeClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7580,7 +7523,7 @@ public void onError(Exception ex) { } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterChangeToModeResponseCallback implements ChipClusters.RvcRunModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7603,7 +7546,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterSupportedModesAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcRunModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7611,9 +7554,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7624,7 +7567,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterStartUpModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7645,7 +7588,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterOnModeAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7653,10 +7596,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7666,7 +7609,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7687,7 +7630,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterEventListAttributeCallback implements ChipClusters.RvcRunModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7708,7 +7651,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcRunModeClusterAttributeListAttributeCallback implements ChipClusters.RvcRunModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7729,7 +7672,8 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAndTemperatureControlledCabinetModeClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRvcCleanModeClusterChangeToModeResponseCallback implements ChipClusters.RvcCleanModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7737,20 +7681,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Optional statusText) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcCleanModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7758,9 +7704,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7771,7 +7717,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7792,7 +7738,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7800,9 +7746,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7813,7 +7759,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7834,7 +7780,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterEventListAttributeCallback implements ChipClusters.RvcCleanModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7855,7 +7801,7 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcCleanModeClusterAttributeListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7876,7 +7822,28 @@ public void onError(Exception ex) { } } - public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterSupportedTemperatureLevelsAttributeCallback implements ChipClusters.TemperatureControlCluster.SupportedTemperatureLevelsAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTemperatureControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7897,8 +7864,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedRvcRunModeClusterChangeToModeResponseCallback implements ChipClusters.RvcRunModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7906,22 +7872,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer status, Optional statusText) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedRvcRunModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcRunModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedTemperatureControlClusterEventListAttributeCallback implements ChipClusters.TemperatureControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7929,9 +7893,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7942,7 +7906,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterOnModeAttributeCallback implements ChipClusters.RvcRunModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedTemperatureControlClusterAttributeListAttributeCallback implements ChipClusters.TemperatureControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7950,10 +7914,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -7963,7 +7927,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7984,7 +7948,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcRunModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8005,7 +7969,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterEventListAttributeCallback implements ChipClusters.RvcRunModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8026,7 +7990,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcRunModeClusterAttributeListAttributeCallback implements ChipClusters.RvcRunModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRefrigeratorAlarmClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8048,7 +8012,7 @@ public void onError(Exception ex) { } - public static class DelegatedRvcCleanModeClusterChangeToModeResponseCallback implements ChipClusters.RvcCleanModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterChangeToModeResponseCallback implements ChipClusters.DishwasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8071,7 +8035,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedRvcCleanModeClusterSupportedModesAttributeCallback implements ChipClusters.RvcCleanModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterSupportedModesAttributeCallback implements ChipClusters.DishwasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8079,9 +8043,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8092,7 +8056,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterOnModeAttributeCallback implements ChipClusters.RvcCleanModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8113,7 +8077,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8121,10 +8085,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8134,7 +8098,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8155,7 +8119,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterEventListAttributeCallback implements ChipClusters.RvcCleanModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8176,7 +8140,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcCleanModeClusterAttributeListAttributeCallback implements ChipClusters.RvcCleanModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterEventListAttributeCallback implements ChipClusters.DishwasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8197,7 +8161,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterSupportedTemperatureLevelsAttributeCallback implements ChipClusters.TemperatureControlCluster.SupportedTemperatureLevelsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherModeClusterAttributeListAttributeCallback implements ChipClusters.DishwasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8205,9 +8169,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8218,7 +8182,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterGeneratedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8239,7 +8203,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.TemperatureControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterAcceptedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8260,7 +8224,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterEventListAttributeCallback implements ChipClusters.TemperatureControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterEventListAttributeCallback implements ChipClusters.AirQualityCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8281,7 +8245,7 @@ public void onError(Exception ex) { } } - public static class DelegatedTemperatureControlClusterAttributeListAttributeCallback implements ChipClusters.TemperatureControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedAirQualityClusterAttributeListAttributeCallback implements ChipClusters.AirQualityCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8302,7 +8266,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8323,7 +8287,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8344,7 +8308,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterEventListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8365,7 +8329,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRefrigeratorAlarmClusterAttributeListAttributeCallback implements ChipClusters.RefrigeratorAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8386,31 +8350,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedDishwasherModeClusterChangeToModeResponseCallback implements ChipClusters.DishwasherModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Optional statusText) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); - responseValues.put(statusResponseValue, status); - CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); - responseValues.put(statusTextResponseValue, statusText); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedDishwasherModeClusterSupportedModesAttributeCallback implements ChipClusters.DishwasherModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8418,9 +8358,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8431,7 +8371,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterStartUpModeAttributeCallback implements ChipClusters.DishwasherModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8439,10 +8379,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8452,7 +8392,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterOnModeAttributeCallback implements ChipClusters.DishwasherModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8460,10 +8400,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8473,7 +8413,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8494,7 +8434,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8502,9 +8442,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8515,7 +8455,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterEventListAttributeCallback implements ChipClusters.DishwasherModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8536,7 +8476,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherModeClusterAttributeListAttributeCallback implements ChipClusters.DishwasherModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8557,7 +8497,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterGeneratedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8578,7 +8518,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterAcceptedCommandListAttributeCallback implements ChipClusters.AirQualityCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8599,7 +8539,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterEventListAttributeCallback implements ChipClusters.AirQualityCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8620,7 +8560,7 @@ public void onError(Exception ex) { } } - public static class DelegatedAirQualityClusterAttributeListAttributeCallback implements ChipClusters.AirQualityCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8641,7 +8581,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8662,7 +8602,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8683,7 +8623,8 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8691,20 +8632,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8712,9 +8653,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8725,7 +8666,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8733,10 +8674,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8746,7 +8687,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8754,10 +8695,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8767,7 +8708,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8775,9 +8716,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8788,7 +8729,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8796,10 +8737,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8809,7 +8750,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8817,9 +8758,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8830,7 +8771,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8851,7 +8792,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8872,7 +8813,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8893,7 +8834,8 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8901,20 +8843,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8922,9 +8864,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8935,7 +8877,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8943,10 +8885,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8956,7 +8898,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8964,10 +8906,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8977,7 +8919,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8985,9 +8927,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8998,8 +8940,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9007,20 +8948,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9028,9 +8969,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9041,7 +8982,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9049,10 +8990,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9062,7 +9003,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9070,10 +9011,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9083,7 +9024,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9091,9 +9032,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9104,7 +9045,8 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedScenesManagementClusterAddSceneResponseCallback implements ChipClusters.ScenesManagementCluster.AddSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9112,20 +9054,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterViewSceneResponseCallback implements ChipClusters.ScenesManagementCluster.ViewSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9133,20 +9080,32 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo transitionTimeResponseValue = new CommandResponseInfo("transitionTime", "Optional"); + responseValues.put(transitionTimeResponseValue, transitionTime); + CommandResponseInfo sceneNameResponseValue = new CommandResponseInfo("sceneName", "Optional"); + responseValues.put(sceneNameResponseValue, sceneName); + // extensionFieldSets: ExtensionFieldSet + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterRemoveSceneResponseCallback implements ChipClusters.ScenesManagementCluster.RemoveSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9154,20 +9113,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterRemoveAllScenesResponseCallback implements ChipClusters.ScenesManagementCluster.RemoveAllScenesResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9175,20 +9139,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Integer groupID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterStoreSceneResponseCallback implements ChipClusters.ScenesManagementCluster.StoreSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9196,21 +9163,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterGetSceneMembershipResponseCallback implements ChipClusters.ScenesManagementCluster.GetSceneMembershipResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9218,11 +9189,18 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList) { Map responseValues = new LinkedHashMap<>(); - // commandResponseState: Struct ErrorStateStruct + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo capacityResponseValue = new CommandResponseInfo("capacity", "Integer"); + responseValues.put(capacityResponseValue, capacity); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + // sceneList: int8u // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @@ -9231,7 +9209,8 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedScenesManagementClusterEnhancedAddSceneResponseCallback implements ChipClusters.ScenesManagementCluster.EnhancedAddSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9239,20 +9218,25 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterEnhancedViewSceneResponseCallback implements ChipClusters.ScenesManagementCluster.EnhancedViewSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9260,20 +9244,32 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIDResponseValue = new CommandResponseInfo("groupID", "Integer"); + responseValues.put(groupIDResponseValue, groupID); + CommandResponseInfo sceneIDResponseValue = new CommandResponseInfo("sceneID", "Integer"); + responseValues.put(sceneIDResponseValue, sceneID); + CommandResponseInfo transitionTimeResponseValue = new CommandResponseInfo("transitionTime", "Optional"); + responseValues.put(transitionTimeResponseValue, transitionTime); + CommandResponseInfo sceneNameResponseValue = new CommandResponseInfo("sceneName", "Optional"); + responseValues.put(sceneNameResponseValue, sceneName); + // extensionFieldSets: ExtensionFieldSet + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterCopySceneResponseCallback implements ChipClusters.ScenesManagementCluster.CopySceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9281,20 +9277,24 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo groupIdentifierFromResponseValue = new CommandResponseInfo("groupIdentifierFrom", "Integer"); + responseValues.put(groupIdentifierFromResponseValue, groupIdentifierFrom); + CommandResponseInfo sceneIdentifierFromResponseValue = new CommandResponseInfo("sceneIdentifierFrom", "Integer"); + responseValues.put(sceneIdentifierFromResponseValue, sceneIdentifierFrom); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterLastConfiguredByAttributeCallback implements ChipClusters.ScenesManagementCluster.LastConfiguredByAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9302,10 +9302,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9315,7 +9315,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterFabricSceneInfoAttributeCallback implements ChipClusters.ScenesManagementCluster.FabricSceneInfoAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9323,10 +9323,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9336,7 +9336,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ScenesManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9357,7 +9357,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ScenesManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9378,7 +9378,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterEventListAttributeCallback implements ChipClusters.ScenesManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9399,7 +9399,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterAttributeListAttributeCallback implements ChipClusters.ScenesManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -19765,10 +19765,6 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.GroupsCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("groups", groupsClusterInfo); - ClusterInfo scenesClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.ScenesCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("scenes", scenesClusterInfo); - ClusterInfo onOffClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.OnOffCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("onOff", onOffClusterInfo); @@ -20001,6 +19997,10 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.RvcOperationalStateCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("rvcOperationalState", rvcOperationalStateClusterInfo); + ClusterInfo scenesManagementClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ScenesManagementCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("scenesManagement", scenesManagementClusterInfo); + ClusterInfo hepaFilterMonitoringClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.HepaFilterMonitoringCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("hepaFilterMonitoring", hepaFilterMonitoringClusterInfo); @@ -20215,7 +20215,6 @@ public Map initializeClusterMap() { public void combineCommand(Map destination, Map> source) { destination.get("identify").combineCommands(source.get("identify")); destination.get("groups").combineCommands(source.get("groups")); - destination.get("scenes").combineCommands(source.get("scenes")); destination.get("onOff").combineCommands(source.get("onOff")); destination.get("onOffSwitchConfiguration").combineCommands(source.get("onOffSwitchConfiguration")); destination.get("levelControl").combineCommands(source.get("levelControl")); @@ -20274,6 +20273,7 @@ public void combineCommand(Map destination, Map> getCommandMap() { InteractionInfo groupsaddGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.GroupsCluster) cluster) - .addGroup((ChipClusters.GroupsCluster.AddGroupResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (String) - commandArguments.get("groupName") - - ); - }, - () -> new DelegatedGroupsClusterAddGroupResponseCallback(), - groupsaddGroupCommandParams - ); - groupsClusterInteractionInfoMap.put("addGroup", groupsaddGroupInteractionInfo); - - Map groupsviewGroupCommandParams = new LinkedHashMap(); - - CommandParameterInfo groupsviewGroupgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - groupsviewGroupCommandParams.put("groupID",groupsviewGroupgroupIDCommandParameterInfo); - InteractionInfo groupsviewGroupInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GroupsCluster) cluster) - .viewGroup((ChipClusters.GroupsCluster.ViewGroupResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - ); - }, - () -> new DelegatedGroupsClusterViewGroupResponseCallback(), - groupsviewGroupCommandParams - ); - groupsClusterInteractionInfoMap.put("viewGroup", groupsviewGroupInteractionInfo); - - Map groupsgetGroupMembershipCommandParams = new LinkedHashMap(); - - CommandParameterInfo groupsgetGroupMembershipgroupListCommandParameterInfo = new CommandParameterInfo("groupList", ArrayList.class, ArrayList.class); - groupsgetGroupMembershipCommandParams.put("groupList",groupsgetGroupMembershipgroupListCommandParameterInfo); - InteractionInfo groupsgetGroupMembershipInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GroupsCluster) cluster) - .getGroupMembership((ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback) callback - , (ArrayList) - commandArguments.get("groupList") - - ); - }, - () -> new DelegatedGroupsClusterGetGroupMembershipResponseCallback(), - groupsgetGroupMembershipCommandParams - ); - groupsClusterInteractionInfoMap.put("getGroupMembership", groupsgetGroupMembershipInteractionInfo); - - Map groupsremoveGroupCommandParams = new LinkedHashMap(); - - CommandParameterInfo groupsremoveGroupgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - groupsremoveGroupCommandParams.put("groupID",groupsremoveGroupgroupIDCommandParameterInfo); - InteractionInfo groupsremoveGroupInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GroupsCluster) cluster) - .removeGroup((ChipClusters.GroupsCluster.RemoveGroupResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - ); - }, - () -> new DelegatedGroupsClusterRemoveGroupResponseCallback(), - groupsremoveGroupCommandParams - ); - groupsClusterInteractionInfoMap.put("removeGroup", groupsremoveGroupInteractionInfo); - - Map groupsremoveAllGroupsCommandParams = new LinkedHashMap(); - InteractionInfo groupsremoveAllGroupsInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GroupsCluster) cluster) - .removeAllGroups((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - groupsremoveAllGroupsCommandParams - ); - groupsClusterInteractionInfoMap.put("removeAllGroups", groupsremoveAllGroupsInteractionInfo); - - Map groupsaddGroupIfIdentifyingCommandParams = new LinkedHashMap(); - - CommandParameterInfo groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - groupsaddGroupIfIdentifyingCommandParams.put("groupID",groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo); - - CommandParameterInfo groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo = new CommandParameterInfo("groupName", String.class, String.class); - groupsaddGroupIfIdentifyingCommandParams.put("groupName",groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo); - InteractionInfo groupsaddGroupIfIdentifyingInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GroupsCluster) cluster) - .addGroupIfIdentifying((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("groupID") - , (String) - commandArguments.get("groupName") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - groupsaddGroupIfIdentifyingCommandParams - ); - groupsClusterInteractionInfoMap.put("addGroupIfIdentifying", groupsaddGroupIfIdentifyingInteractionInfo); - - commandMap.put("groups", groupsClusterInteractionInfoMap); - - Map scenesClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map scenesaddSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesaddScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesaddSceneCommandParams.put("groupID",scenesaddScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesaddScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesaddSceneCommandParams.put("sceneID",scenesaddScenesceneIDCommandParameterInfo); - - CommandParameterInfo scenesaddScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - scenesaddSceneCommandParams.put("transitionTime",scenesaddScenetransitionTimeCommandParameterInfo); - - CommandParameterInfo scenesaddScenesceneNameCommandParameterInfo = new CommandParameterInfo("sceneName", String.class, String.class); - scenesaddSceneCommandParams.put("sceneName",scenesaddScenesceneNameCommandParameterInfo); - - InteractionInfo scenesaddSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .addScene((ChipClusters.ScenesCluster.AddSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - - , (Integer) - commandArguments.get("transitionTime") - - , (String) - commandArguments.get("sceneName") - - , (ArrayList) - commandArguments.get("extensionFieldSets") - - ); - }, - () -> new DelegatedScenesClusterAddSceneResponseCallback(), - scenesaddSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("addScene", scenesaddSceneInteractionInfo); - - Map scenesviewSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesviewScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesviewSceneCommandParams.put("groupID",scenesviewScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesviewScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesviewSceneCommandParams.put("sceneID",scenesviewScenesceneIDCommandParameterInfo); - InteractionInfo scenesviewSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .viewScene((ChipClusters.ScenesCluster.ViewSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - - ); - }, - () -> new DelegatedScenesClusterViewSceneResponseCallback(), - scenesviewSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("viewScene", scenesviewSceneInteractionInfo); - - Map scenesremoveSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesremoveScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesremoveSceneCommandParams.put("groupID",scenesremoveScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesremoveScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesremoveSceneCommandParams.put("sceneID",scenesremoveScenesceneIDCommandParameterInfo); - InteractionInfo scenesremoveSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .removeScene((ChipClusters.ScenesCluster.RemoveSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - - ); - }, - () -> new DelegatedScenesClusterRemoveSceneResponseCallback(), - scenesremoveSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("removeScene", scenesremoveSceneInteractionInfo); - - Map scenesremoveAllScenesCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesremoveAllScenesgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesremoveAllScenesCommandParams.put("groupID",scenesremoveAllScenesgroupIDCommandParameterInfo); - InteractionInfo scenesremoveAllScenesInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .removeAllScenes((ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - ); - }, - () -> new DelegatedScenesClusterRemoveAllScenesResponseCallback(), - scenesremoveAllScenesCommandParams - ); - scenesClusterInteractionInfoMap.put("removeAllScenes", scenesremoveAllScenesInteractionInfo); - - Map scenesstoreSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesstoreScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesstoreSceneCommandParams.put("groupID",scenesstoreScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesstoreScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesstoreSceneCommandParams.put("sceneID",scenesstoreScenesceneIDCommandParameterInfo); - InteractionInfo scenesstoreSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .storeScene((ChipClusters.ScenesCluster.StoreSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - - ); - }, - () -> new DelegatedScenesClusterStoreSceneResponseCallback(), - scenesstoreSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("storeScene", scenesstoreSceneInteractionInfo); - - Map scenesrecallSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesrecallScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesrecallSceneCommandParams.put("groupID",scenesrecallScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesrecallScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesrecallSceneCommandParams.put("sceneID",scenesrecallScenesceneIDCommandParameterInfo); - - CommandParameterInfo scenesrecallScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Optional.class, Integer.class); - scenesrecallSceneCommandParams.put("transitionTime",scenesrecallScenetransitionTimeCommandParameterInfo); - InteractionInfo scenesrecallSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .recallScene((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("groupID") - , (Integer) - commandArguments.get("sceneID") - , (Optional) - commandArguments.get("transitionTime") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - scenesrecallSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("recallScene", scenesrecallSceneInteractionInfo); - - Map scenesgetSceneMembershipCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesgetSceneMembershipgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesgetSceneMembershipCommandParams.put("groupID",scenesgetSceneMembershipgroupIDCommandParameterInfo); - InteractionInfo scenesgetSceneMembershipInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .getSceneMembership((ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - ); - }, - () -> new DelegatedScenesClusterGetSceneMembershipResponseCallback(), - scenesgetSceneMembershipCommandParams - ); - scenesClusterInteractionInfoMap.put("getSceneMembership", scenesgetSceneMembershipInteractionInfo); - - Map scenesenhancedAddSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesenhancedAddScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesenhancedAddSceneCommandParams.put("groupID",scenesenhancedAddScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesenhancedAddScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesenhancedAddSceneCommandParams.put("sceneID",scenesenhancedAddScenesceneIDCommandParameterInfo); - - CommandParameterInfo scenesenhancedAddScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - scenesenhancedAddSceneCommandParams.put("transitionTime",scenesenhancedAddScenetransitionTimeCommandParameterInfo); - - CommandParameterInfo scenesenhancedAddScenesceneNameCommandParameterInfo = new CommandParameterInfo("sceneName", String.class, String.class); - scenesenhancedAddSceneCommandParams.put("sceneName",scenesenhancedAddScenesceneNameCommandParameterInfo); - - InteractionInfo scenesenhancedAddSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .enhancedAddScene((ChipClusters.ScenesCluster.EnhancedAddSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - + .addGroup((ChipClusters.GroupsCluster.AddGroupResponseCallback) callback , (Integer) - commandArguments.get("transitionTime") + commandArguments.get("groupID") , (String) - commandArguments.get("sceneName") - - , (ArrayList) - commandArguments.get("extensionFieldSets") + commandArguments.get("groupName") ); }, - () -> new DelegatedScenesClusterEnhancedAddSceneResponseCallback(), - scenesenhancedAddSceneCommandParams + () -> new DelegatedGroupsClusterAddGroupResponseCallback(), + groupsaddGroupCommandParams ); - scenesClusterInteractionInfoMap.put("enhancedAddScene", scenesenhancedAddSceneInteractionInfo); - - Map scenesenhancedViewSceneCommandParams = new LinkedHashMap(); + groupsClusterInteractionInfoMap.put("addGroup", groupsaddGroupInteractionInfo); - CommandParameterInfo scenesenhancedViewScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesenhancedViewSceneCommandParams.put("groupID",scenesenhancedViewScenegroupIDCommandParameterInfo); + Map groupsviewGroupCommandParams = new LinkedHashMap(); - CommandParameterInfo scenesenhancedViewScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesenhancedViewSceneCommandParams.put("sceneID",scenesenhancedViewScenesceneIDCommandParameterInfo); - InteractionInfo scenesenhancedViewSceneInteractionInfo = new InteractionInfo( + CommandParameterInfo groupsviewGroupgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsviewGroupCommandParams.put("groupID",groupsviewGroupgroupIDCommandParameterInfo); + InteractionInfo groupsviewGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .enhancedViewScene((ChipClusters.ScenesCluster.EnhancedViewSceneResponseCallback) callback + ((ChipClusters.GroupsCluster) cluster) + .viewGroup((ChipClusters.GroupsCluster.ViewGroupResponseCallback) callback , (Integer) commandArguments.get("groupID") - , (Integer) - commandArguments.get("sceneID") - ); }, - () -> new DelegatedScenesClusterEnhancedViewSceneResponseCallback(), - scenesenhancedViewSceneCommandParams + () -> new DelegatedGroupsClusterViewGroupResponseCallback(), + groupsviewGroupCommandParams ); - scenesClusterInteractionInfoMap.put("enhancedViewScene", scenesenhancedViewSceneInteractionInfo); - - Map scenescopySceneCommandParams = new LinkedHashMap(); + groupsClusterInteractionInfoMap.put("viewGroup", groupsviewGroupInteractionInfo); - CommandParameterInfo scenescopyScenemodeCommandParameterInfo = new CommandParameterInfo("mode", Integer.class, Integer.class); - scenescopySceneCommandParams.put("mode",scenescopyScenemodeCommandParameterInfo); + Map groupsgetGroupMembershipCommandParams = new LinkedHashMap(); - CommandParameterInfo scenescopyScenegroupIdentifierFromCommandParameterInfo = new CommandParameterInfo("groupIdentifierFrom", Integer.class, Integer.class); - scenescopySceneCommandParams.put("groupIdentifierFrom",scenescopyScenegroupIdentifierFromCommandParameterInfo); + CommandParameterInfo groupsgetGroupMembershipgroupListCommandParameterInfo = new CommandParameterInfo("groupList", ArrayList.class, ArrayList.class); + groupsgetGroupMembershipCommandParams.put("groupList",groupsgetGroupMembershipgroupListCommandParameterInfo); + InteractionInfo groupsgetGroupMembershipInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GroupsCluster) cluster) + .getGroupMembership((ChipClusters.GroupsCluster.GetGroupMembershipResponseCallback) callback + , (ArrayList) + commandArguments.get("groupList") - CommandParameterInfo scenescopyScenesceneIdentifierFromCommandParameterInfo = new CommandParameterInfo("sceneIdentifierFrom", Integer.class, Integer.class); - scenescopySceneCommandParams.put("sceneIdentifierFrom",scenescopyScenesceneIdentifierFromCommandParameterInfo); + ); + }, + () -> new DelegatedGroupsClusterGetGroupMembershipResponseCallback(), + groupsgetGroupMembershipCommandParams + ); + groupsClusterInteractionInfoMap.put("getGroupMembership", groupsgetGroupMembershipInteractionInfo); - CommandParameterInfo scenescopyScenegroupIdentifierToCommandParameterInfo = new CommandParameterInfo("groupIdentifierTo", Integer.class, Integer.class); - scenescopySceneCommandParams.put("groupIdentifierTo",scenescopyScenegroupIdentifierToCommandParameterInfo); + Map groupsremoveGroupCommandParams = new LinkedHashMap(); - CommandParameterInfo scenescopyScenesceneIdentifierToCommandParameterInfo = new CommandParameterInfo("sceneIdentifierTo", Integer.class, Integer.class); - scenescopySceneCommandParams.put("sceneIdentifierTo",scenescopyScenesceneIdentifierToCommandParameterInfo); - InteractionInfo scenescopySceneInteractionInfo = new InteractionInfo( + CommandParameterInfo groupsremoveGroupgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsremoveGroupCommandParams.put("groupID",groupsremoveGroupgroupIDCommandParameterInfo); + InteractionInfo groupsremoveGroupInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .copyScene((ChipClusters.ScenesCluster.CopySceneResponseCallback) callback + ((ChipClusters.GroupsCluster) cluster) + .removeGroup((ChipClusters.GroupsCluster.RemoveGroupResponseCallback) callback , (Integer) - commandArguments.get("mode") + commandArguments.get("groupID") - , (Integer) - commandArguments.get("groupIdentifierFrom") + ); + }, + () -> new DelegatedGroupsClusterRemoveGroupResponseCallback(), + groupsremoveGroupCommandParams + ); + groupsClusterInteractionInfoMap.put("removeGroup", groupsremoveGroupInteractionInfo); - , (Integer) - commandArguments.get("sceneIdentifierFrom") + Map groupsremoveAllGroupsCommandParams = new LinkedHashMap(); + InteractionInfo groupsremoveAllGroupsInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GroupsCluster) cluster) + .removeAllGroups((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + groupsremoveAllGroupsCommandParams + ); + groupsClusterInteractionInfoMap.put("removeAllGroups", groupsremoveAllGroupsInteractionInfo); - , (Integer) - commandArguments.get("groupIdentifierTo") + Map groupsaddGroupIfIdentifyingCommandParams = new LinkedHashMap(); - , (Integer) - commandArguments.get("sceneIdentifierTo") + CommandParameterInfo groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + groupsaddGroupIfIdentifyingCommandParams.put("groupID",groupsaddGroupIfIdentifyinggroupIDCommandParameterInfo); - ); - }, - () -> new DelegatedScenesClusterCopySceneResponseCallback(), - scenescopySceneCommandParams - ); - scenesClusterInteractionInfoMap.put("copyScene", scenescopySceneInteractionInfo); + CommandParameterInfo groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo = new CommandParameterInfo("groupName", String.class, String.class); + groupsaddGroupIfIdentifyingCommandParams.put("groupName",groupsaddGroupIfIdentifyinggroupNameCommandParameterInfo); + InteractionInfo groupsaddGroupIfIdentifyingInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GroupsCluster) cluster) + .addGroupIfIdentifying((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("groupID") + , (String) + commandArguments.get("groupName") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + groupsaddGroupIfIdentifyingCommandParams + ); + groupsClusterInteractionInfoMap.put("addGroupIfIdentifying", groupsaddGroupIfIdentifyingInteractionInfo); - commandMap.put("scenes", scenesClusterInteractionInfoMap); + commandMap.put("groups", groupsClusterInteractionInfoMap); Map onOffClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -23099,6 +22814,291 @@ public Map> getCommandMap() { commandMap.put("rvcOperationalState", rvcOperationalStateClusterInteractionInfoMap); + Map scenesManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map scenesManagementaddSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementaddScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementaddSceneCommandParams.put("groupID",scenesManagementaddScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementaddScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementaddSceneCommandParams.put("sceneID",scenesManagementaddScenesceneIDCommandParameterInfo); + + CommandParameterInfo scenesManagementaddScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + scenesManagementaddSceneCommandParams.put("transitionTime",scenesManagementaddScenetransitionTimeCommandParameterInfo); + + CommandParameterInfo scenesManagementaddScenesceneNameCommandParameterInfo = new CommandParameterInfo("sceneName", String.class, String.class); + scenesManagementaddSceneCommandParams.put("sceneName",scenesManagementaddScenesceneNameCommandParameterInfo); + + InteractionInfo scenesManagementaddSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .addScene((ChipClusters.ScenesManagementCluster.AddSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + , (Integer) + commandArguments.get("transitionTime") + + , (String) + commandArguments.get("sceneName") + + , (ArrayList) + commandArguments.get("extensionFieldSets") + + ); + }, + () -> new DelegatedScenesManagementClusterAddSceneResponseCallback(), + scenesManagementaddSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("addScene", scenesManagementaddSceneInteractionInfo); + + Map scenesManagementviewSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementviewScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementviewSceneCommandParams.put("groupID",scenesManagementviewScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementviewScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementviewSceneCommandParams.put("sceneID",scenesManagementviewScenesceneIDCommandParameterInfo); + InteractionInfo scenesManagementviewSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .viewScene((ChipClusters.ScenesManagementCluster.ViewSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + ); + }, + () -> new DelegatedScenesManagementClusterViewSceneResponseCallback(), + scenesManagementviewSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("viewScene", scenesManagementviewSceneInteractionInfo); + + Map scenesManagementremoveSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementremoveScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementremoveSceneCommandParams.put("groupID",scenesManagementremoveScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementremoveScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementremoveSceneCommandParams.put("sceneID",scenesManagementremoveScenesceneIDCommandParameterInfo); + InteractionInfo scenesManagementremoveSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .removeScene((ChipClusters.ScenesManagementCluster.RemoveSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + ); + }, + () -> new DelegatedScenesManagementClusterRemoveSceneResponseCallback(), + scenesManagementremoveSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("removeScene", scenesManagementremoveSceneInteractionInfo); + + Map scenesManagementremoveAllScenesCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementremoveAllScenesgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementremoveAllScenesCommandParams.put("groupID",scenesManagementremoveAllScenesgroupIDCommandParameterInfo); + InteractionInfo scenesManagementremoveAllScenesInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .removeAllScenes((ChipClusters.ScenesManagementCluster.RemoveAllScenesResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + ); + }, + () -> new DelegatedScenesManagementClusterRemoveAllScenesResponseCallback(), + scenesManagementremoveAllScenesCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("removeAllScenes", scenesManagementremoveAllScenesInteractionInfo); + + Map scenesManagementstoreSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementstoreScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementstoreSceneCommandParams.put("groupID",scenesManagementstoreScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementstoreScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementstoreSceneCommandParams.put("sceneID",scenesManagementstoreScenesceneIDCommandParameterInfo); + InteractionInfo scenesManagementstoreSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .storeScene((ChipClusters.ScenesManagementCluster.StoreSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + ); + }, + () -> new DelegatedScenesManagementClusterStoreSceneResponseCallback(), + scenesManagementstoreSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("storeScene", scenesManagementstoreSceneInteractionInfo); + + Map scenesManagementrecallSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementrecallScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementrecallSceneCommandParams.put("groupID",scenesManagementrecallScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementrecallScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementrecallSceneCommandParams.put("sceneID",scenesManagementrecallScenesceneIDCommandParameterInfo); + + CommandParameterInfo scenesManagementrecallScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Optional.class, Integer.class); + scenesManagementrecallSceneCommandParams.put("transitionTime",scenesManagementrecallScenetransitionTimeCommandParameterInfo); + InteractionInfo scenesManagementrecallSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .recallScene((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("groupID") + , (Integer) + commandArguments.get("sceneID") + , (Optional) + commandArguments.get("transitionTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + scenesManagementrecallSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("recallScene", scenesManagementrecallSceneInteractionInfo); + + Map scenesManagementgetSceneMembershipCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementgetSceneMembershipgroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementgetSceneMembershipCommandParams.put("groupID",scenesManagementgetSceneMembershipgroupIDCommandParameterInfo); + InteractionInfo scenesManagementgetSceneMembershipInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .getSceneMembership((ChipClusters.ScenesManagementCluster.GetSceneMembershipResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + ); + }, + () -> new DelegatedScenesManagementClusterGetSceneMembershipResponseCallback(), + scenesManagementgetSceneMembershipCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("getSceneMembership", scenesManagementgetSceneMembershipInteractionInfo); + + Map scenesManagementenhancedAddSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementenhancedAddScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementenhancedAddSceneCommandParams.put("groupID",scenesManagementenhancedAddScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementenhancedAddScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementenhancedAddSceneCommandParams.put("sceneID",scenesManagementenhancedAddScenesceneIDCommandParameterInfo); + + CommandParameterInfo scenesManagementenhancedAddScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + scenesManagementenhancedAddSceneCommandParams.put("transitionTime",scenesManagementenhancedAddScenetransitionTimeCommandParameterInfo); + + CommandParameterInfo scenesManagementenhancedAddScenesceneNameCommandParameterInfo = new CommandParameterInfo("sceneName", String.class, String.class); + scenesManagementenhancedAddSceneCommandParams.put("sceneName",scenesManagementenhancedAddScenesceneNameCommandParameterInfo); + + InteractionInfo scenesManagementenhancedAddSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .enhancedAddScene((ChipClusters.ScenesManagementCluster.EnhancedAddSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + , (Integer) + commandArguments.get("transitionTime") + + , (String) + commandArguments.get("sceneName") + + , (ArrayList) + commandArguments.get("extensionFieldSets") + + ); + }, + () -> new DelegatedScenesManagementClusterEnhancedAddSceneResponseCallback(), + scenesManagementenhancedAddSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("enhancedAddScene", scenesManagementenhancedAddSceneInteractionInfo); + + Map scenesManagementenhancedViewSceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementenhancedViewScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); + scenesManagementenhancedViewSceneCommandParams.put("groupID",scenesManagementenhancedViewScenegroupIDCommandParameterInfo); + + CommandParameterInfo scenesManagementenhancedViewScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesManagementenhancedViewSceneCommandParams.put("sceneID",scenesManagementenhancedViewScenesceneIDCommandParameterInfo); + InteractionInfo scenesManagementenhancedViewSceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .enhancedViewScene((ChipClusters.ScenesManagementCluster.EnhancedViewSceneResponseCallback) callback + , (Integer) + commandArguments.get("groupID") + + , (Integer) + commandArguments.get("sceneID") + + ); + }, + () -> new DelegatedScenesManagementClusterEnhancedViewSceneResponseCallback(), + scenesManagementenhancedViewSceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("enhancedViewScene", scenesManagementenhancedViewSceneInteractionInfo); + + Map scenesManagementcopySceneCommandParams = new LinkedHashMap(); + + CommandParameterInfo scenesManagementcopyScenemodeCommandParameterInfo = new CommandParameterInfo("mode", Integer.class, Integer.class); + scenesManagementcopySceneCommandParams.put("mode",scenesManagementcopyScenemodeCommandParameterInfo); + + CommandParameterInfo scenesManagementcopyScenegroupIdentifierFromCommandParameterInfo = new CommandParameterInfo("groupIdentifierFrom", Integer.class, Integer.class); + scenesManagementcopySceneCommandParams.put("groupIdentifierFrom",scenesManagementcopyScenegroupIdentifierFromCommandParameterInfo); + + CommandParameterInfo scenesManagementcopyScenesceneIdentifierFromCommandParameterInfo = new CommandParameterInfo("sceneIdentifierFrom", Integer.class, Integer.class); + scenesManagementcopySceneCommandParams.put("sceneIdentifierFrom",scenesManagementcopyScenesceneIdentifierFromCommandParameterInfo); + + CommandParameterInfo scenesManagementcopyScenegroupIdentifierToCommandParameterInfo = new CommandParameterInfo("groupIdentifierTo", Integer.class, Integer.class); + scenesManagementcopySceneCommandParams.put("groupIdentifierTo",scenesManagementcopyScenegroupIdentifierToCommandParameterInfo); + + CommandParameterInfo scenesManagementcopyScenesceneIdentifierToCommandParameterInfo = new CommandParameterInfo("sceneIdentifierTo", Integer.class, Integer.class); + scenesManagementcopySceneCommandParams.put("sceneIdentifierTo",scenesManagementcopyScenesceneIdentifierToCommandParameterInfo); + InteractionInfo scenesManagementcopySceneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster) + .copyScene((ChipClusters.ScenesManagementCluster.CopySceneResponseCallback) callback + , (Integer) + commandArguments.get("mode") + + , (Integer) + commandArguments.get("groupIdentifierFrom") + + , (Integer) + commandArguments.get("sceneIdentifierFrom") + + , (Integer) + commandArguments.get("groupIdentifierTo") + + , (Integer) + commandArguments.get("sceneIdentifierTo") + + ); + }, + () -> new DelegatedScenesManagementClusterCopySceneResponseCallback(), + scenesManagementcopySceneCommandParams + ); + scenesManagementClusterInteractionInfoMap.put("copyScene", scenesManagementcopySceneInteractionInfo); + + commandMap.put("scenesManagement", scenesManagementClusterInteractionInfoMap); + Map hepaFilterMonitoringClusterInteractionInfoMap = new LinkedHashMap<>(); Map hepaFilterMonitoringresetConditionCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 1ea61257791b59..35ea1ba5220d21 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -198,164 +198,6 @@ private static Map readGroupsInteractionInfo() { return result; } - private static Map readScenesInteractionInfo() { - Map result = new LinkedHashMap<>();Map readScenesSceneCountCommandParams = new LinkedHashMap(); - InteractionInfo readScenesSceneCountAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readSceneCountAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesSceneCountCommandParams - ); - result.put("readSceneCountAttribute", readScenesSceneCountAttributeInteractionInfo); - Map readScenesCurrentSceneCommandParams = new LinkedHashMap(); - InteractionInfo readScenesCurrentSceneAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readCurrentSceneAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesCurrentSceneCommandParams - ); - result.put("readCurrentSceneAttribute", readScenesCurrentSceneAttributeInteractionInfo); - Map readScenesCurrentGroupCommandParams = new LinkedHashMap(); - InteractionInfo readScenesCurrentGroupAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readCurrentGroupAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesCurrentGroupCommandParams - ); - result.put("readCurrentGroupAttribute", readScenesCurrentGroupAttributeInteractionInfo); - Map readScenesSceneValidCommandParams = new LinkedHashMap(); - InteractionInfo readScenesSceneValidAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readSceneValidAttribute( - (ChipClusters.BooleanAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), - readScenesSceneValidCommandParams - ); - result.put("readSceneValidAttribute", readScenesSceneValidAttributeInteractionInfo); - Map readScenesNameSupportCommandParams = new LinkedHashMap(); - InteractionInfo readScenesNameSupportAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readNameSupportAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesNameSupportCommandParams - ); - result.put("readNameSupportAttribute", readScenesNameSupportAttributeInteractionInfo); - Map readScenesLastConfiguredByCommandParams = new LinkedHashMap(); - InteractionInfo readScenesLastConfiguredByAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readLastConfiguredByAttribute( - (ChipClusters.ScenesCluster.LastConfiguredByAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterLastConfiguredByAttributeCallback(), - readScenesLastConfiguredByCommandParams - ); - result.put("readLastConfiguredByAttribute", readScenesLastConfiguredByAttributeInteractionInfo); - Map readScenesSceneTableSizeCommandParams = new LinkedHashMap(); - InteractionInfo readScenesSceneTableSizeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readSceneTableSizeAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesSceneTableSizeCommandParams - ); - result.put("readSceneTableSizeAttribute", readScenesSceneTableSizeAttributeInteractionInfo); - Map readScenesFabricSceneInfoCommandParams = new LinkedHashMap(); - InteractionInfo readScenesFabricSceneInfoAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readFabricSceneInfoAttribute( - (ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterFabricSceneInfoAttributeCallback(), - readScenesFabricSceneInfoCommandParams - ); - result.put("readFabricSceneInfoAttribute", readScenesFabricSceneInfoAttributeInteractionInfo); - Map readScenesGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readScenesGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.ScenesCluster.GeneratedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterGeneratedCommandListAttributeCallback(), - readScenesGeneratedCommandListCommandParams - ); - result.put("readGeneratedCommandListAttribute", readScenesGeneratedCommandListAttributeInteractionInfo); - Map readScenesAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readScenesAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.ScenesCluster.AcceptedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterAcceptedCommandListAttributeCallback(), - readScenesAcceptedCommandListCommandParams - ); - result.put("readAcceptedCommandListAttribute", readScenesAcceptedCommandListAttributeInteractionInfo); - Map readScenesEventListCommandParams = new LinkedHashMap(); - InteractionInfo readScenesEventListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readEventListAttribute( - (ChipClusters.ScenesCluster.EventListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterEventListAttributeCallback(), - readScenesEventListCommandParams - ); - result.put("readEventListAttribute", readScenesEventListAttributeInteractionInfo); - Map readScenesAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readScenesAttributeListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readAttributeListAttribute( - (ChipClusters.ScenesCluster.AttributeListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedScenesClusterAttributeListAttributeCallback(), - readScenesAttributeListCommandParams - ); - result.put("readAttributeListAttribute", readScenesAttributeListAttributeInteractionInfo); - Map readScenesFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readScenesFeatureMapAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readFeatureMapAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readScenesFeatureMapCommandParams - ); - result.put("readFeatureMapAttribute", readScenesFeatureMapAttributeInteractionInfo); - Map readScenesClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readScenesClusterRevisionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readClusterRevisionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesClusterRevisionCommandParams - ); - result.put("readClusterRevisionAttribute", readScenesClusterRevisionAttributeInteractionInfo); - - return result; - } private static Map readOnOffInteractionInfo() { Map result = new LinkedHashMap<>();Map readOnOffOnOffCommandParams = new LinkedHashMap(); InteractionInfo readOnOffOnOffAttributeInteractionInfo = new InteractionInfo( @@ -8376,6 +8218,164 @@ private static Map readRvcOperationalStateInteractionIn return result; } + private static Map readScenesManagementInteractionInfo() { + Map result = new LinkedHashMap<>();Map readScenesManagementSceneCountCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementSceneCountAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readSceneCountAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementSceneCountCommandParams + ); + result.put("readSceneCountAttribute", readScenesManagementSceneCountAttributeInteractionInfo); + Map readScenesManagementCurrentSceneCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementCurrentSceneAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readCurrentSceneAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementCurrentSceneCommandParams + ); + result.put("readCurrentSceneAttribute", readScenesManagementCurrentSceneAttributeInteractionInfo); + Map readScenesManagementCurrentGroupCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementCurrentGroupAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readCurrentGroupAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementCurrentGroupCommandParams + ); + result.put("readCurrentGroupAttribute", readScenesManagementCurrentGroupAttributeInteractionInfo); + Map readScenesManagementSceneValidCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementSceneValidAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readSceneValidAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readScenesManagementSceneValidCommandParams + ); + result.put("readSceneValidAttribute", readScenesManagementSceneValidAttributeInteractionInfo); + Map readScenesManagementNameSupportCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementNameSupportAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readNameSupportAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementNameSupportCommandParams + ); + result.put("readNameSupportAttribute", readScenesManagementNameSupportAttributeInteractionInfo); + Map readScenesManagementLastConfiguredByCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementLastConfiguredByAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readLastConfiguredByAttribute( + (ChipClusters.ScenesManagementCluster.LastConfiguredByAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterLastConfiguredByAttributeCallback(), + readScenesManagementLastConfiguredByCommandParams + ); + result.put("readLastConfiguredByAttribute", readScenesManagementLastConfiguredByAttributeInteractionInfo); + Map readScenesManagementSceneTableSizeCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementSceneTableSizeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readSceneTableSizeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementSceneTableSizeCommandParams + ); + result.put("readSceneTableSizeAttribute", readScenesManagementSceneTableSizeAttributeInteractionInfo); + Map readScenesManagementFabricSceneInfoCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementFabricSceneInfoAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readFabricSceneInfoAttribute( + (ChipClusters.ScenesManagementCluster.FabricSceneInfoAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterFabricSceneInfoAttributeCallback(), + readScenesManagementFabricSceneInfoCommandParams + ); + result.put("readFabricSceneInfoAttribute", readScenesManagementFabricSceneInfoAttributeInteractionInfo); + Map readScenesManagementGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ScenesManagementCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterGeneratedCommandListAttributeCallback(), + readScenesManagementGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readScenesManagementGeneratedCommandListAttributeInteractionInfo); + Map readScenesManagementAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ScenesManagementCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterAcceptedCommandListAttributeCallback(), + readScenesManagementAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readScenesManagementAcceptedCommandListAttributeInteractionInfo); + Map readScenesManagementEventListCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readEventListAttribute( + (ChipClusters.ScenesManagementCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterEventListAttributeCallback(), + readScenesManagementEventListCommandParams + ); + result.put("readEventListAttribute", readScenesManagementEventListAttributeInteractionInfo); + Map readScenesManagementAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readAttributeListAttribute( + (ChipClusters.ScenesManagementCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedScenesManagementClusterAttributeListAttributeCallback(), + readScenesManagementAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readScenesManagementAttributeListAttributeInteractionInfo); + Map readScenesManagementFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readScenesManagementFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readScenesManagementFeatureMapAttributeInteractionInfo); + Map readScenesManagementClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readScenesManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ScenesManagementCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readScenesManagementClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readScenesManagementClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readHepaFilterMonitoringInteractionInfo() { Map result = new LinkedHashMap<>();Map readHepaFilterMonitoringConditionCommandParams = new LinkedHashMap(); InteractionInfo readHepaFilterMonitoringConditionAttributeInteractionInfo = new InteractionInfo( @@ -19832,7 +19832,6 @@ public Map> getReadAttributeMap() { return new HashMap>(){{ put("identify", readIdentifyInteractionInfo()); put("groups", readGroupsInteractionInfo()); - put("scenes", readScenesInteractionInfo()); put("onOff", readOnOffInteractionInfo()); put("onOffSwitchConfiguration", readOnOffSwitchConfigurationInteractionInfo()); put("levelControl", readLevelControlInteractionInfo()); @@ -19891,6 +19890,7 @@ public Map> getReadAttributeMap() { put("microwaveOvenControl", readMicrowaveOvenControlInteractionInfo()); put("operationalState", readOperationalStateInteractionInfo()); put("rvcOperationalState", readRvcOperationalStateInteractionInfo()); + put("scenesManagement", readScenesManagementInteractionInfo()); put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo()); put("activatedCarbonFilterMonitoring", readActivatedCarbonFilterMonitoringInteractionInfo()); put("booleanStateConfiguration", readBooleanStateConfigurationInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 6373b57b8bef14..c3003c33ed19e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -52,8 +52,6 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("identify", writeIdentifyInteractionInfo); Map writeGroupsInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("groups", writeGroupsInteractionInfo); - Map writeScenesInteractionInfo = new LinkedHashMap<>(); - writeAttributeMap.put("scenes", writeScenesInteractionInfo); Map writeOnOffInteractionInfo = new LinkedHashMap<>(); Map writeOnOffOnTimeCommandParams = new LinkedHashMap(); CommandParameterInfo onOffonTimeCommandParameterInfo = @@ -1116,6 +1114,8 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("operationalState", writeOperationalStateInteractionInfo); Map writeRvcOperationalStateInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("rvcOperationalState", writeRvcOperationalStateInteractionInfo); + Map writeScenesManagementInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("scenesManagement", writeScenesManagementInteractionInfo); Map writeHepaFilterMonitoringInteractionInfo = new LinkedHashMap<>(); Map writeHepaFilterMonitoringLastChangedTimeCommandParams = new LinkedHashMap(); CommandParameterInfo hepaFilterMonitoringlastChangedTimeCommandParameterInfo = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 71cd44ecdf0ce4..1cbd4a38983f5c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -99,9 +99,9 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt similarity index 82% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt index f26ab20211dd8d..3cf9c98d53e6d1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt @@ -22,9 +22,9 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterAttributeValuePair(val attributeID: ULong, val attributeValue: ULong) { +class ScenesManagementClusterAttributeValuePair(val attributeID: ULong, val attributeValue: ULong) { override fun toString(): String = buildString { - append("ScenesClusterAttributeValuePair {\n") + append("ScenesManagementClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") append("}\n") @@ -43,14 +43,14 @@ class ScenesClusterAttributeValuePair(val attributeID: ULong, val attributeValue private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterAttributeValuePair { tlvReader.enterStructure(tlvTag) val attributeID = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) tlvReader.exitContainer() - return ScenesClusterAttributeValuePair(attributeID, attributeValue) + return ScenesManagementClusterAttributeValuePair(attributeID, attributeValue) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt similarity index 78% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt index 7999a24e2d78de..3ef60f519e09c2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt @@ -23,12 +23,12 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterExtensionFieldSet( +class ScenesManagementClusterExtensionFieldSet( val clusterID: ULong, - val attributeValueList: List + val attributeValueList: List ) { override fun toString(): String = buildString { - append("ScenesClusterExtensionFieldSet {\n") + append("ScenesManagementClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") append("}\n") @@ -51,21 +51,21 @@ class ScenesClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterExtensionFieldSet { tlvReader.enterStructure(tlvTag) val clusterID = tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER_I_D)) val attributeValueList = - buildList { + buildList { tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } tlvReader.exitContainer() - return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) + return ScenesManagementClusterExtensionFieldSet(clusterID, attributeValueList) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt similarity index 92% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt index 066ade4d02a12f..74979432fbc571 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt @@ -22,7 +22,7 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterSceneInfoStruct( +class ScenesManagementClusterSceneInfoStruct( val sceneCount: UInt, val currentScene: UInt, val currentGroup: UInt, @@ -31,7 +31,7 @@ class ScenesClusterSceneInfoStruct( val fabricIndex: UInt ) { override fun toString(): String = buildString { - append("ScenesClusterSceneInfoStruct {\n") + append("ScenesManagementClusterSceneInfoStruct {\n") append("\tsceneCount : $sceneCount\n") append("\tcurrentScene : $currentScene\n") append("\tcurrentGroup : $currentGroup\n") @@ -62,7 +62,7 @@ class ScenesClusterSceneInfoStruct( private const val TAG_REMAINING_CAPACITY = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterSceneInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterSceneInfoStruct { tlvReader.enterStructure(tlvTag) val sceneCount = tlvReader.getUInt(ContextSpecificTag(TAG_SCENE_COUNT)) val currentScene = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_SCENE)) @@ -73,7 +73,7 @@ class ScenesClusterSceneInfoStruct( tlvReader.exitContainer() - return ScenesClusterSceneInfoStruct( + return ScenesManagementClusterSceneInfoStruct( sceneCount, currentScene, currentGroup, diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesManagementCluster.kt similarity index 97% rename from src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesCluster.kt rename to src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesManagementCluster.kt index a1428d2a98780f..a7c4b66d6ee5be 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesManagementCluster.kt @@ -41,7 +41,10 @@ import matter.tlv.ContextSpecificTag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesCluster(private val controller: MatterController, private val endpointId: UShort) { +class ScenesManagementCluster( + private val controller: MatterController, + private val endpointId: UShort +) { class AddSceneResponse(val status: UByte, val groupID: UShort, val sceneID: UByte) class ViewSceneResponse( @@ -50,7 +53,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi val sceneID: UByte, val transitionTime: UShort?, val sceneName: String?, - val extensionFieldSets: List? + val extensionFieldSets: List? ) class RemoveSceneResponse(val status: UByte, val groupID: UShort, val sceneID: UByte) @@ -74,7 +77,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi val sceneID: UByte, val transitionTime: UShort?, val sceneName: String?, - val extensionFieldSets: List? + val extensionFieldSets: List? ) class CopySceneResponse( @@ -93,10 +96,10 @@ class ScenesCluster(private val controller: MatterController, private val endpoi object SubscriptionEstablished : LastConfiguredByAttributeSubscriptionState() } - class FabricSceneInfoAttribute(val value: List) + class FabricSceneInfoAttribute(val value: List) sealed class FabricSceneInfoAttributeSubscriptionState { - data class Success(val value: List) : + data class Success(val value: List) : FabricSceneInfoAttributeSubscriptionState() data class Error(val exception: Exception) : FabricSceneInfoAttributeSubscriptionState() @@ -149,7 +152,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi sceneID: UByte, transitionTime: UShort, sceneName: String, - extensionFieldSets: List, + extensionFieldSets: List, timedInvokeTimeout: Duration? = null ): AddSceneResponse { val commandId: UInt = 0u @@ -278,7 +281,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi var sceneName_decoded: String? = null val TAG_EXTENSION_FIELD_SETS: Int = 5 - var extensionFieldSets_decoded: List? = null + var extensionFieldSets_decoded: List? = null while (!tlvReader.isEndOfContainer()) { val tag = tlvReader.peekElement().tag @@ -330,10 +333,10 @@ class ScenesCluster(private val controller: MatterController, private val endpoi null } else { if (tlvReader.isNextTag(tag)) { - buildList { + buildList { tlvReader.enterArray(tag) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterExtensionFieldSet.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterExtensionFieldSet.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } @@ -717,7 +720,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi sceneID: UByte, transitionTime: UShort, sceneName: String, - extensionFieldSets: List, + extensionFieldSets: List, timedInvokeTimeout: Duration? = null ): EnhancedAddSceneResponse { val commandId: UInt = 64u @@ -846,7 +849,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi var sceneName_decoded: String? = null val TAG_EXTENSION_FIELD_SETS: Int = 5 - var extensionFieldSets_decoded: List? = null + var extensionFieldSets_decoded: List? = null while (!tlvReader.isEndOfContainer()) { val tag = tlvReader.peekElement().tag @@ -898,10 +901,10 @@ class ScenesCluster(private val controller: MatterController, private val endpoi null } else { if (tlvReader.isNextTag(tag)) { - buildList { + buildList { tlvReader.enterArray(tag) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterExtensionFieldSet.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterExtensionFieldSet.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } @@ -1684,11 +1687,11 @@ class ScenesCluster(private val controller: MatterController, private val endpoi // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: List = - buildList { + val decodedValue: List = + buildList { tlvReader.enterArray(AnonymousTag) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterSceneInfoStruct.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterSceneInfoStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } @@ -1737,11 +1740,11 @@ class ScenesCluster(private val controller: MatterController, private val endpoi // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: List = - buildList { + val decodedValue: List = + buildList { tlvReader.enterArray(AnonymousTag) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterSceneInfoStruct.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterSceneInfoStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } @@ -2304,7 +2307,7 @@ class ScenesCluster(private val controller: MatterController, private val endpoi } companion object { - private val logger = Logger.getLogger(ScenesCluster::class.java.name) - const val CLUSTER_ID: UInt = 5u + private val logger = Logger.getLogger(ScenesManagementCluster::class.java.name) + const val CLUSTER_ID: UInt = 98u } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 132c4f40450d1d..83ff5cb6e20a0d 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -99,9 +99,9 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterAttributeValuePair.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterExtensionFieldSet.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterSceneInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetStruct.kt", @@ -298,7 +298,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcOperationalStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/RvcRunModeCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/SampleMeiCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ScenesManagementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/SmokeCoAlarmCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/SoftwareDiagnosticsCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/SwitchCluster.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt similarity index 82% rename from src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterAttributeValuePair.kt rename to src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt index b64a49bfb3c025..1a14970ba2bd58 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterAttributeValuePair.kt @@ -22,9 +22,9 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterAttributeValuePair(val attributeID: UInt, val attributeValue: UInt) { +class ScenesManagementClusterAttributeValuePair(val attributeID: UInt, val attributeValue: UInt) { override fun toString(): String = buildString { - append("ScenesClusterAttributeValuePair {\n") + append("ScenesManagementClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") append("}\n") @@ -43,14 +43,14 @@ class ScenesClusterAttributeValuePair(val attributeID: UInt, val attributeValue: private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterAttributeValuePair { tlvReader.enterStructure(tlvTag) val attributeID = tlvReader.getUInt(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) val attributeValue = tlvReader.getUInt(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) tlvReader.exitContainer() - return ScenesClusterAttributeValuePair(attributeID, attributeValue) + return ScenesManagementClusterAttributeValuePair(attributeID, attributeValue) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt similarity index 78% rename from src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterExtensionFieldSet.kt rename to src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt index 24f21fcdbcf814..516c53bfb62604 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt @@ -23,12 +23,12 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterExtensionFieldSet( +class ScenesManagementClusterExtensionFieldSet( val clusterID: UInt, - val attributeValueList: List + val attributeValueList: List ) { override fun toString(): String = buildString { - append("ScenesClusterExtensionFieldSet {\n") + append("ScenesManagementClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") append("}\n") @@ -51,21 +51,21 @@ class ScenesClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterExtensionFieldSet { tlvReader.enterStructure(tlvTag) val clusterID = tlvReader.getUInt(ContextSpecificTag(TAG_CLUSTER_I_D)) val attributeValueList = - buildList { + buildList { tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) while (!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + add(ScenesManagementClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } tlvReader.exitContainer() - return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) + return ScenesManagementClusterExtensionFieldSet(clusterID, attributeValueList) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterSceneInfoStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt similarity index 92% rename from src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterSceneInfoStruct.kt rename to src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt index a77c286d44f563..5a753f4acf803d 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesClusterSceneInfoStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt @@ -22,7 +22,7 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ScenesClusterSceneInfoStruct( +class ScenesManagementClusterSceneInfoStruct( val sceneCount: UByte, val currentScene: UByte, val currentGroup: UShort, @@ -31,7 +31,7 @@ class ScenesClusterSceneInfoStruct( val fabricIndex: UByte ) { override fun toString(): String = buildString { - append("ScenesClusterSceneInfoStruct {\n") + append("ScenesManagementClusterSceneInfoStruct {\n") append("\tsceneCount : $sceneCount\n") append("\tcurrentScene : $currentScene\n") append("\tcurrentGroup : $currentGroup\n") @@ -62,7 +62,7 @@ class ScenesClusterSceneInfoStruct( private const val TAG_REMAINING_CAPACITY = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterSceneInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesManagementClusterSceneInfoStruct { tlvReader.enterStructure(tlvTag) val sceneCount = tlvReader.getUByte(ContextSpecificTag(TAG_SCENE_COUNT)) val currentScene = tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_SCENE)) @@ -73,7 +73,7 @@ class ScenesClusterSceneInfoStruct( tlvReader.exitContainer() - return ScenesClusterSceneInfoStruct( + return ScenesManagementClusterSceneInfoStruct( sceneCount, currentScene, currentGroup, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 3b49ab4f4cf7aa..86c0ce2e3d36f5 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -369,44 +369,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::Scenes::Id: { - using namespace app::Clusters::Scenes; + case app::Clusters::OnOff::Id: { + using namespace app::Clusters::OnOff; switch (aPath.mAttributeId) { - case Attributes::SceneCount::Id: { - using TypeInfo = Attributes::SceneCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::CurrentScene::Id: { - using TypeInfo = Attributes::CurrentScene::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::CurrentGroup::Id: { - using TypeInfo = Attributes::CurrentGroup::TypeInfo; + case Attributes::OnOff::Id: { + using TypeInfo = Attributes::OnOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -414,15 +382,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::SceneValid::Id: { - using TypeInfo = Attributes::SceneValid::TypeInfo; + case Attributes::GlobalSceneControl::Id: { + using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -437,8 +405,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } - case Attributes::NameSupport::Id: { - using TypeInfo = Attributes::NameSupport::TypeInfo; + case Attributes::OnTime::Id: { + using TypeInfo = Attributes::OnTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -448,36 +416,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Raw()); + jint jnivalue = static_cast(cppValue); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } - case Attributes::LastConfiguredBy::Id: { - using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::SceneTableSize::Id: { - using TypeInfo = Attributes::SceneTableSize::TypeInfo; + case Attributes::OffWaitTime::Id: { + using TypeInfo = Attributes::OffWaitTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -492,8 +437,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::FabricSceneInfo::Id: { - using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; + case Attributes::StartUpOnOff::Id: { + using TypeInfo = Attributes::StartUpOnOff::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -501,81 +446,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) + if (cppValue.IsNull()) { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_sceneCount; - std::string newElement_0_sceneCountClassName = "java/lang/Integer"; - std::string newElement_0_sceneCountCtorSignature = "(I)V"; - jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), - newElement_0_sceneCountCtorSignature.c_str(), - jninewElement_0_sceneCount, newElement_0_sceneCount); - jobject newElement_0_currentScene; - std::string newElement_0_currentSceneClassName = "java/lang/Integer"; - std::string newElement_0_currentSceneCtorSignature = "(I)V"; - jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), - newElement_0_currentSceneCtorSignature.c_str(), - jninewElement_0_currentScene, newElement_0_currentScene); - jobject newElement_0_currentGroup; - std::string newElement_0_currentGroupClassName = "java/lang/Integer"; - std::string newElement_0_currentGroupCtorSignature = "(I)V"; - jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), - newElement_0_currentGroupCtorSignature.c_str(), - jninewElement_0_currentGroup, newElement_0_currentGroup); - jobject newElement_0_sceneValid; - std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; - std::string newElement_0_sceneValidCtorSignature = "(Z)V"; - jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), - newElement_0_sceneValidCtorSignature.c_str(), - jninewElement_0_sceneValid, newElement_0_sceneValid); - jobject newElement_0_remainingCapacity; - std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; - std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; - jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), - jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass sceneInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", sceneInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); - return nullptr; - } - - jmethodID sceneInfoStructStructCtor_1; - err = - chip::JniReferences::GetInstance().FindMethod(env, sceneInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" - "lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &sceneInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, - newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, - newElement_0_remainingCapacity, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -717,44 +598,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::OnOff::Id: { - using namespace app::Clusters::OnOff; + case app::Clusters::OnOffSwitchConfiguration::Id: { + using namespace app::Clusters::OnOffSwitchConfiguration; switch (aPath.mAttributeId) { - case Attributes::OnOff::Id: { - using TypeInfo = Attributes::OnOff::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::GlobalSceneControl::Id: { - using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::OnTime::Id: { - using TypeInfo = Attributes::OnTime::TypeInfo; + case Attributes::SwitchType::Id: { + using TypeInfo = Attributes::SwitchType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -769,8 +618,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OffWaitTime::Id: { - using TypeInfo = Attributes::OffWaitTime::TypeInfo; + case Attributes::SwitchActions::Id: { + using TypeInfo = Attributes::SwitchActions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -785,29 +634,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpOnOff::Id: { - using TypeInfo = Attributes::StartUpOnOff::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -946,186 +772,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::OnOffSwitchConfiguration::Id: { - using namespace app::Clusters::OnOffSwitchConfiguration; + case app::Clusters::LevelControl::Id: { + using namespace app::Clusters::LevelControl; switch (aPath.mAttributeId) { - case Attributes::SwitchType::Id: { - using TypeInfo = Attributes::SwitchType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::SwitchActions::Id: { - using TypeInfo = Attributes::SwitchActions::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case app::Clusters::LevelControl::Id: { - using namespace app::Clusters::LevelControl; - switch (aPath.mAttributeId) - { - case Attributes::CurrentLevel::Id: { - using TypeInfo = Attributes::CurrentLevel::TypeInfo; + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18392,6 +18044,354 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } + case app::Clusters::ScenesManagement::Id: { + using namespace app::Clusters::ScenesManagement; + switch (aPath.mAttributeId) + { + case Attributes::SceneCount::Id: { + using TypeInfo = Attributes::SceneCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::CurrentScene::Id: { + using TypeInfo = Attributes::CurrentScene::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::CurrentGroup::Id: { + using TypeInfo = Attributes::CurrentGroup::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SceneValid::Id: { + using TypeInfo = Attributes::SceneValid::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::LastConfiguredBy::Id: { + using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::SceneTableSize::Id: { + using TypeInfo = Attributes::SceneTableSize::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); + return nullptr; + } + + jmethodID sceneInfoStructStructCtor_1; + err = + chip::JniReferences::GetInstance().FindMethod(env, sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &sceneInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } case app::Clusters::HepaFilterMonitoring::Id: { using namespace app::Clusters::HepaFilterMonitoring; switch (aPath.mAttributeId) diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index f3275d2400a40a..23240110a76f9d 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -44,17 +44,6 @@ typedef void (*GroupsEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesFabricSceneInfoListAttributeCallback)( - void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*ScenesAttributeListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, @@ -689,6 +678,18 @@ typedef void (*RvcOperationalStateEventListListAttributeCallback)(void * context const chip::app::DataModel::DecodableList & data); typedef void (*RvcOperationalStateAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesManagementFabricSceneInfoListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*ScenesManagementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesManagementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesManagementEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesManagementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*HepaFilterMonitoringReplacementProductListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 7f8f8be2a0077f..2dc5ac3303b7df 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -57,16 +57,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::Scenes::Id: { - using namespace app::Clusters::Scenes; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } case app::Clusters::OnOff::Id: { using namespace app::Clusters::OnOff; switch (aPath.mEventId) @@ -3853,6 +3843,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::ScenesManagement::Id: { + using namespace app::Clusters::ScenesManagement; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::HepaFilterMonitoring::Id: { using namespace app::Clusters::HepaFilterMonitoring; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 0611659ab41f0d..0a1171eab1635c 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -316,8 +316,8 @@ void CHIPGroupsClusterRemoveGroupResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } -CHIPScenesClusterAddSceneResponseCallback::CHIPScenesClusterAddSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -333,7 +333,7 @@ CHIPScenesClusterAddSceneResponseCallback::CHIPScenesClusterAddSceneResponseCall } } -CHIPScenesClusterAddSceneResponseCallback::~CHIPScenesClusterAddSceneResponseCallback() +CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -344,8 +344,9 @@ CHIPScenesClusterAddSceneResponseCallback::~CHIPScenesClusterAddSceneResponseCal env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & dataResponse) +void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -355,17 +356,21 @@ void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -374,23 +379,116 @@ void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); + jobject DelayedActionTime; + if (!dataResponse.delayedActionTime.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, DelayedActionTime); + } + else + { + jobject DelayedActionTimeInsideOptional; + std::string DelayedActionTimeInsideOptionalClassName = "java/lang/Long"; + std::string DelayedActionTimeInsideOptionalCtorSignature = "(J)V"; + jlong jniDelayedActionTimeInsideOptional = static_cast(dataResponse.delayedActionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + DelayedActionTimeInsideOptionalClassName.c_str(), DelayedActionTimeInsideOptionalCtorSignature.c_str(), + jniDelayedActionTimeInsideOptional, DelayedActionTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(DelayedActionTimeInsideOptional, DelayedActionTime); + } + jobject ImageURI; + if (!dataResponse.imageURI.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ImageURI); + } + else + { + jobject ImageURIInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.imageURI.Value(), ImageURIInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(ImageURIInsideOptional, ImageURI); + } + jobject SoftwareVersion; + if (!dataResponse.softwareVersion.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersion); + } + else + { + jobject SoftwareVersionInsideOptional; + std::string SoftwareVersionInsideOptionalClassName = "java/lang/Long"; + std::string SoftwareVersionInsideOptionalCtorSignature = "(J)V"; + jlong jniSoftwareVersionInsideOptional = static_cast(dataResponse.softwareVersion.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + SoftwareVersionInsideOptionalClassName.c_str(), SoftwareVersionInsideOptionalCtorSignature.c_str(), + jniSoftwareVersionInsideOptional, SoftwareVersionInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionInsideOptional, SoftwareVersion); + } + jobject SoftwareVersionString; + if (!dataResponse.softwareVersionString.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersionString); + } + else + { + jobject SoftwareVersionStringInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.softwareVersionString.Value(), + SoftwareVersionStringInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionStringInsideOptional, SoftwareVersionString); + } + jobject UpdateToken; + if (!dataResponse.updateToken.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, UpdateToken); + } + else + { + jobject UpdateTokenInsideOptional; + jbyteArray UpdateTokenInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.updateToken.Value().size())); + env->SetByteArrayRegion(UpdateTokenInsideOptionalByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), + reinterpret_cast(dataResponse.updateToken.Value().data())); + UpdateTokenInsideOptional = UpdateTokenInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(UpdateTokenInsideOptional, UpdateToken); + } + jobject UserConsentNeeded; + if (!dataResponse.userConsentNeeded.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, UserConsentNeeded); + } + else + { + jobject UserConsentNeededInsideOptional; + std::string UserConsentNeededInsideOptionalClassName = "java/lang/Boolean"; + std::string UserConsentNeededInsideOptionalCtorSignature = "(Z)V"; + jboolean jniUserConsentNeededInsideOptional = static_cast(dataResponse.userConsentNeeded.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + UserConsentNeededInsideOptionalClassName.c_str(), UserConsentNeededInsideOptionalCtorSignature.c_str(), + jniUserConsentNeededInsideOptional, UserConsentNeededInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(UserConsentNeededInsideOptional, UserConsentNeeded); + } + jobject MetadataForRequestor; + if (!dataResponse.metadataForRequestor.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, MetadataForRequestor); + } + else + { + jobject MetadataForRequestorInsideOptional; + jbyteArray MetadataForRequestorInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.metadataForRequestor.Value().size())); + env->SetByteArrayRegion(MetadataForRequestorInsideOptionalByteArray, 0, + static_cast(dataResponse.metadataForRequestor.Value().size()), + reinterpret_cast(dataResponse.metadataForRequestor.Value().data())); + MetadataForRequestorInsideOptional = MetadataForRequestorInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(MetadataForRequestorInsideOptional, MetadataForRequestor); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, DelayedActionTime, ImageURI, SoftwareVersion, SoftwareVersionString, + UpdateToken, UserConsentNeeded, MetadataForRequestor); } -CHIPScenesClusterViewSceneResponseCallback::CHIPScenesClusterViewSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -406,7 +504,7 @@ CHIPScenesClusterViewSceneResponseCallback::CHIPScenesClusterViewSceneResponseCa } } -CHIPScenesClusterViewSceneResponseCallback::~CHIPScenesClusterViewSceneResponseCallback() +CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -417,8 +515,9 @@ CHIPScenesClusterViewSceneResponseCallback::~CHIPScenesClusterViewSceneResponseC env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & dataResponse) +void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -428,194 +527,65 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - jobject TransitionTime; - if (!dataResponse.transitionTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); - } - else - { - jobject TransitionTimeInsideOptional; - std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; - std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; - jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), - TransitionTimeInsideOptionalCtorSignature.c_str(), - jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); - } - jobject SceneName; - if (!dataResponse.sceneName.HasValue()) + jobject Action; + std::string ActionClassName = "java/lang/Integer"; + std::string ActionCtorSignature = "(I)V"; + jint jniAction = static_cast(dataResponse.action); + chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), jniAction, + Action); + jobject DelayedActionTime; + std::string DelayedActionTimeClassName = "java/lang/Long"; + std::string DelayedActionTimeCtorSignature = "(J)V"; + jlong jniDelayedActionTime = static_cast(dataResponse.delayedActionTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + DelayedActionTimeClassName.c_str(), DelayedActionTimeCtorSignature.c_str(), jniDelayedActionTime, DelayedActionTime); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Action, DelayedActionTime); +} +CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CHIPGeneralCommissioningClusterArmFailSafeResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - else + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { - jobject SceneNameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.sceneName.Value(), SceneNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); + ChipLogError(Zcl, "Could not create global reference for Java callback"); } - jobject ExtensionFieldSets; - if (!dataResponse.extensionFieldSets.HasValue()) +} + +CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::~CHIPGeneralCommissioningClusterArmFailSafeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; } - else - { - jobject ExtensionFieldSetsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); - - auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); - while (iter_ExtensionFieldSetsInsideOptional_1.Next()) - { - auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_clusterID; - std::string newElement_1_clusterIDClassName = "java/lang/Long"; - std::string newElement_1_clusterIDCtorSignature = "(J)V"; - jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), - newElement_1_clusterIDCtorSignature.c_str(), - jninewElement_1_clusterID, newElement_1_clusterID); - jobject newElement_1_attributeValueList; - chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); + env->DeleteGlobalRef(javaCallbackRef); +}; - auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); - while (iter_newElement_1_attributeValueList_3.Next()) - { - auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); - jobject newElement_3; - jobject newElement_3_attributeID; - std::string newElement_3_attributeIDClassName = "java/lang/Long"; - std::string newElement_3_attributeIDCtorSignature = "(J)V"; - jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), - newElement_3_attributeIDCtorSignature.c_str(), - jninewElement_3_attributeID, newElement_3_attributeID); - jobject newElement_3_attributeValue; - std::string newElement_3_attributeValueClassName = "java/lang/Long"; - std::string newElement_3_attributeValueCtorSignature = "(J)V"; - jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), - jninewElement_3_attributeValue, newElement_3_attributeValue); - - jclass attributeValuePairStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesClusterAttributeValuePair", attributeValuePairStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterAttributeValuePair"); - return; - } - - jmethodID attributeValuePairStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, attributeValuePairStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &attributeValuePairStructCtor_4); - if (err != CHIP_NO_ERROR || attributeValuePairStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterAttributeValuePair constructor"); - return; - } - - newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, - newElement_3_attributeID, newElement_3_attributeValue); - chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); - } - - jclass extensionFieldSetStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesClusterExtensionFieldSet", extensionFieldSetStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterExtensionFieldSet"); - return; - } - - jmethodID extensionFieldSetStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, extensionFieldSetStructClass_2, "", - "(Ljava/lang/Long;Ljava/util/ArrayList;)V", - &extensionFieldSetStructCtor_2); - if (err != CHIP_NO_ERROR || extensionFieldSetStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterExtensionFieldSet constructor"); - return; - } - - newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, - newElement_1_attributeValueList); - chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); -} -CHIPScenesClusterRemoveSceneResponseCallback::CHIPScenesClusterRemoveSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesClusterRemoveSceneResponseCallback::~CHIPScenesClusterRemoveSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesClusterRemoveSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & dataResponse) +void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -625,42 +595,34 @@ void CHIPScenesClusterRemoveSceneResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); + jobject DebugText; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } -CHIPScenesClusterRemoveAllScenesResponseCallback::CHIPScenesClusterRemoveAllScenesResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: + CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -676,7 +638,8 @@ CHIPScenesClusterRemoveAllScenesResponseCallback::CHIPScenesClusterRemoveAllScen } } -CHIPScenesClusterRemoveAllScenesResponseCallback::~CHIPScenesClusterRemoveAllScenesResponseCallback() +CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: + ~CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -687,8 +650,9 @@ CHIPScenesClusterRemoveAllScenesResponseCallback::~CHIPScenesClusterRemoveAllSce env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPScenesClusterRemoveAllScenesResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & dataResponse) +void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -698,36 +662,34 @@ void CHIPScenesClusterRemoveAllScenesResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); + jobject DebugText; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } -CHIPScenesClusterStoreSceneResponseCallback::CHIPScenesClusterStoreSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: + CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -743,7 +705,8 @@ CHIPScenesClusterStoreSceneResponseCallback::CHIPScenesClusterStoreSceneResponse } } -CHIPScenesClusterStoreSceneResponseCallback::~CHIPScenesClusterStoreSceneResponseCallback() +CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: + ~CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -754,8 +717,9 @@ CHIPScenesClusterStoreSceneResponseCallback::~CHIPScenesClusterStoreSceneRespons env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPScenesClusterStoreSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & dataResponse) +void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -765,42 +729,33 @@ void CHIPScenesClusterStoreSceneResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); + jobject ErrorCode; + std::string ErrorCodeClassName = "java/lang/Integer"; + std::string ErrorCodeCtorSignature = "(I)V"; + jint jniErrorCode = static_cast(dataResponse.errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), + jniErrorCode, ErrorCode); + jobject DebugText; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); + env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); } -CHIPScenesClusterGetSceneMembershipResponseCallback::CHIPScenesClusterGetSceneMembershipResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CHIPNetworkCommissioningClusterScanNetworksResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -816,7 +771,7 @@ CHIPScenesClusterGetSceneMembershipResponseCallback::CHIPScenesClusterGetSceneMe } } -CHIPScenesClusterGetSceneMembershipResponseCallback::~CHIPScenesClusterGetSceneMembershipResponseCallback() +CHIPNetworkCommissioningClusterScanNetworksResponseCallback::~CHIPNetworkCommissioningClusterScanNetworksResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -827,8 +782,8 @@ CHIPScenesClusterGetSceneMembershipResponseCallback::~CHIPScenesClusterGetSceneM env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & dataResponse) +void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -838,10 +793,10 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -849,411 +804,212 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject Capacity; - if (dataResponse.capacity.IsNull()) + jobject NetworkingStatus; + std::string NetworkingStatusClassName = "java/lang/Integer"; + std::string NetworkingStatusCtorSignature = "(I)V"; + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); + jobject DebugText; + if (!dataResponse.debugText.HasValue()) { - Capacity = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); } else { - std::string CapacityClassName = "java/lang/Integer"; - std::string CapacityCtorSignature = "(I)V"; - jint jniCapacity = static_cast(dataResponse.capacity.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), - jniCapacity, Capacity); + jobject DebugTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); } - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneList; - if (!dataResponse.sceneList.HasValue()) + jobject WiFiScanResults; + if (!dataResponse.wiFiScanResults.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneList); + chip::JniReferences::GetInstance().CreateOptional(nullptr, WiFiScanResults); } else { - jobject SceneListInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(SceneListInsideOptional); - - auto iter_SceneListInsideOptional_1 = dataResponse.sceneList.Value().begin(); - while (iter_SceneListInsideOptional_1.Next()) - { - auto & entry_1 = iter_SceneListInsideOptional_1.GetValue(); - jobject newElement_1; - std::string newElement_1ClassName = "java/lang/Integer"; - std::string newElement_1CtorSignature = "(I)V"; - jint jninewElement_1 = static_cast(entry_1); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); - chip::JniReferences::GetInstance().AddToList(SceneListInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(SceneListInsideOptional, SceneList); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupID, SceneList); -} -CHIPScenesClusterEnhancedAddSceneResponseCallback::CHIPScenesClusterEnhancedAddSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesClusterEnhancedAddSceneResponseCallback::~CHIPScenesClusterEnhancedAddSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesClusterEnhancedAddSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); -} -CHIPScenesClusterEnhancedViewSceneResponseCallback::CHIPScenesClusterEnhancedViewSceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesClusterEnhancedViewSceneResponseCallback::~CHIPScenesClusterEnhancedViewSceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesClusterEnhancedViewSceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupID; - std::string GroupIDClassName = "java/lang/Integer"; - std::string GroupIDCtorSignature = "(I)V"; - jint jniGroupID = static_cast(dataResponse.groupID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, - GroupID); - jobject SceneID; - std::string SceneIDClassName = "java/lang/Integer"; - std::string SceneIDCtorSignature = "(I)V"; - jint jniSceneID = static_cast(dataResponse.sceneID); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, - SceneID); - jobject TransitionTime; - if (!dataResponse.transitionTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); - } - else - { - jobject TransitionTimeInsideOptional; - std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; - std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; - jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), - TransitionTimeInsideOptionalCtorSignature.c_str(), - jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); - } - jobject SceneName; - if (!dataResponse.sceneName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); - } - else - { - jobject SceneNameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.sceneName.Value(), SceneNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); - } - jobject ExtensionFieldSets; - if (!dataResponse.extensionFieldSets.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); - } - else - { - jobject ExtensionFieldSetsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); + jobject WiFiScanResultsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(WiFiScanResultsInsideOptional); - auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); - while (iter_ExtensionFieldSetsInsideOptional_1.Next()) + auto iter_WiFiScanResultsInsideOptional_1 = dataResponse.wiFiScanResults.Value().begin(); + while (iter_WiFiScanResultsInsideOptional_1.Next()) { - auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); + auto & entry_1 = iter_WiFiScanResultsInsideOptional_1.GetValue(); jobject newElement_1; - jobject newElement_1_clusterID; - std::string newElement_1_clusterIDClassName = "java/lang/Long"; - std::string newElement_1_clusterIDCtorSignature = "(J)V"; - jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), - newElement_1_clusterIDCtorSignature.c_str(), - jninewElement_1_clusterID, newElement_1_clusterID); - jobject newElement_1_attributeValueList; - chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); + jobject newElement_1_security; + std::string newElement_1_securityClassName = "java/lang/Integer"; + std::string newElement_1_securityCtorSignature = "(I)V"; + jint jninewElement_1_security = static_cast(entry_1.security.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), + newElement_1_securityCtorSignature.c_str(), + jninewElement_1_security, newElement_1_security); + jobject newElement_1_ssid; + jbyteArray newElement_1_ssidByteArray = env->NewByteArray(static_cast(entry_1.ssid.size())); + env->SetByteArrayRegion(newElement_1_ssidByteArray, 0, static_cast(entry_1.ssid.size()), + reinterpret_cast(entry_1.ssid.data())); + newElement_1_ssid = newElement_1_ssidByteArray; + jobject newElement_1_bssid; + jbyteArray newElement_1_bssidByteArray = env->NewByteArray(static_cast(entry_1.bssid.size())); + env->SetByteArrayRegion(newElement_1_bssidByteArray, 0, static_cast(entry_1.bssid.size()), + reinterpret_cast(entry_1.bssid.data())); + newElement_1_bssid = newElement_1_bssidByteArray; + jobject newElement_1_channel; + std::string newElement_1_channelClassName = "java/lang/Integer"; + std::string newElement_1_channelCtorSignature = "(I)V"; + jint jninewElement_1_channel = static_cast(entry_1.channel); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + jninewElement_1_channel, newElement_1_channel); + jobject newElement_1_wiFiBand; + std::string newElement_1_wiFiBandClassName = "java/lang/Integer"; + std::string newElement_1_wiFiBandCtorSignature = "(I)V"; + jint jninewElement_1_wiFiBand = static_cast(entry_1.wiFiBand); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_wiFiBandClassName.c_str(), + newElement_1_wiFiBandCtorSignature.c_str(), + jninewElement_1_wiFiBand, newElement_1_wiFiBand); + jobject newElement_1_rssi; + std::string newElement_1_rssiClassName = "java/lang/Integer"; + std::string newElement_1_rssiCtorSignature = "(I)V"; + jint jninewElement_1_rssi = static_cast(entry_1.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), + newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, + newElement_1_rssi); - auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); - while (iter_newElement_1_attributeValueList_3.Next()) + jclass wiFiInterfaceScanResultStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", + wiFiInterfaceScanResultStructStructClass_2); + if (err != CHIP_NO_ERROR) { - auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); - jobject newElement_3; - jobject newElement_3_attributeID; - std::string newElement_3_attributeIDClassName = "java/lang/Long"; - std::string newElement_3_attributeIDCtorSignature = "(J)V"; - jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), - newElement_3_attributeIDCtorSignature.c_str(), - jninewElement_3_attributeID, newElement_3_attributeID); - jobject newElement_3_attributeValue; - std::string newElement_3_attributeValueClassName = "java/lang/Long"; - std::string newElement_3_attributeValueCtorSignature = "(J)V"; - jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), - jninewElement_3_attributeValue, newElement_3_attributeValue); + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); + return; + } - jclass attributeValuePairStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesClusterAttributeValuePair", attributeValuePairStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterAttributeValuePair"); - return; - } + jmethodID wiFiInterfaceScanResultStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, wiFiInterfaceScanResultStructStructClass_2, "", + "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &wiFiInterfaceScanResultStructStructCtor_2); + if (err != CHIP_NO_ERROR || wiFiInterfaceScanResultStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); + return; + } - jmethodID attributeValuePairStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, attributeValuePairStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &attributeValuePairStructCtor_4); - if (err != CHIP_NO_ERROR || attributeValuePairStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterAttributeValuePair constructor"); - return; - } + newElement_1 = env->NewObject(wiFiInterfaceScanResultStructStructClass_2, wiFiInterfaceScanResultStructStructCtor_2, + newElement_1_security, newElement_1_ssid, newElement_1_bssid, newElement_1_channel, + newElement_1_wiFiBand, newElement_1_rssi); + chip::JniReferences::GetInstance().AddToList(WiFiScanResultsInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(WiFiScanResultsInsideOptional, WiFiScanResults); + } + jobject ThreadScanResults; + if (!dataResponse.threadScanResults.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ThreadScanResults); + } + else + { + jobject ThreadScanResultsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(ThreadScanResultsInsideOptional); - newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, - newElement_3_attributeID, newElement_3_attributeValue); - chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); - } + auto iter_ThreadScanResultsInsideOptional_1 = dataResponse.threadScanResults.Value().begin(); + while (iter_ThreadScanResultsInsideOptional_1.Next()) + { + auto & entry_1 = iter_ThreadScanResultsInsideOptional_1.GetValue(); + jobject newElement_1; + jobject newElement_1_panId; + std::string newElement_1_panIdClassName = "java/lang/Integer"; + std::string newElement_1_panIdCtorSignature = "(I)V"; + jint jninewElement_1_panId = static_cast(entry_1.panId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_panIdClassName.c_str(), + newElement_1_panIdCtorSignature.c_str(), + jninewElement_1_panId, newElement_1_panId); + jobject newElement_1_extendedPanId; + std::string newElement_1_extendedPanIdClassName = "java/lang/Long"; + std::string newElement_1_extendedPanIdCtorSignature = "(J)V"; + jlong jninewElement_1_extendedPanId = static_cast(entry_1.extendedPanId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), + newElement_1_extendedPanIdCtorSignature.c_str(), + jninewElement_1_extendedPanId, newElement_1_extendedPanId); + jobject newElement_1_networkName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.networkName, newElement_1_networkName)); + jobject newElement_1_channel; + std::string newElement_1_channelClassName = "java/lang/Integer"; + std::string newElement_1_channelCtorSignature = "(I)V"; + jint jninewElement_1_channel = static_cast(entry_1.channel); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), + newElement_1_channelCtorSignature.c_str(), + jninewElement_1_channel, newElement_1_channel); + jobject newElement_1_version; + std::string newElement_1_versionClassName = "java/lang/Integer"; + std::string newElement_1_versionCtorSignature = "(I)V"; + jint jninewElement_1_version = static_cast(entry_1.version); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), + newElement_1_versionCtorSignature.c_str(), + jninewElement_1_version, newElement_1_version); + jobject newElement_1_extendedAddress; + jbyteArray newElement_1_extendedAddressByteArray = + env->NewByteArray(static_cast(entry_1.extendedAddress.size())); + env->SetByteArrayRegion(newElement_1_extendedAddressByteArray, 0, static_cast(entry_1.extendedAddress.size()), + reinterpret_cast(entry_1.extendedAddress.data())); + newElement_1_extendedAddress = newElement_1_extendedAddressByteArray; + jobject newElement_1_rssi; + std::string newElement_1_rssiClassName = "java/lang/Integer"; + std::string newElement_1_rssiCtorSignature = "(I)V"; + jint jninewElement_1_rssi = static_cast(entry_1.rssi); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), + newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, + newElement_1_rssi); + jobject newElement_1_lqi; + std::string newElement_1_lqiClassName = "java/lang/Integer"; + std::string newElement_1_lqiCtorSignature = "(I)V"; + jint jninewElement_1_lqi = static_cast(entry_1.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), jninewElement_1_lqi, newElement_1_lqi); - jclass extensionFieldSetStructClass_2; + jclass threadInterfaceScanResultStructStructClass_2; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesClusterExtensionFieldSet", extensionFieldSetStructClass_2); + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", + threadInterfaceScanResultStructStructClass_2); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterExtensionFieldSet"); + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); return; } - jmethodID extensionFieldSetStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, extensionFieldSetStructClass_2, "", - "(Ljava/lang/Long;Ljava/util/ArrayList;)V", - &extensionFieldSetStructCtor_2); - if (err != CHIP_NO_ERROR || extensionFieldSetStructCtor_2 == nullptr) + jmethodID threadInterfaceScanResultStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, threadInterfaceScanResultStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/" + "Integer;Ljava/lang/Integer;)V", + &threadInterfaceScanResultStructStructCtor_2); + if (err != CHIP_NO_ERROR || threadInterfaceScanResultStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterExtensionFieldSet constructor"); + ChipLogError(Zcl, + "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); return; } - newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, - newElement_1_attributeValueList); - chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); + newElement_1 = + env->NewObject(threadInterfaceScanResultStructStructClass_2, threadInterfaceScanResultStructStructCtor_2, + newElement_1_panId, newElement_1_extendedPanId, newElement_1_networkName, newElement_1_channel, + newElement_1_version, newElement_1_extendedAddress, newElement_1_rssi, newElement_1_lqi); + chip::JniReferences::GetInstance().AddToList(ThreadScanResultsInsideOptional, newElement_1); } - chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); -} -CHIPScenesClusterCopySceneResponseCallback::CHIPScenesClusterCopySceneResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPScenesClusterCopySceneResponseCallback::~CHIPScenesClusterCopySceneResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; + chip::JniReferences::GetInstance().CreateOptional(ThreadScanResultsInsideOptional, ThreadScanResults); } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPScenesClusterCopySceneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject GroupIdentifierFrom; - std::string GroupIdentifierFromClassName = "java/lang/Integer"; - std::string GroupIdentifierFromCtorSignature = "(I)V"; - jint jniGroupIdentifierFrom = static_cast(dataResponse.groupIdentifierFrom); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), - GroupIdentifierFromCtorSignature.c_str(), jniGroupIdentifierFrom, - GroupIdentifierFrom); - jobject SceneIdentifierFrom; - std::string SceneIdentifierFromClassName = "java/lang/Integer"; - std::string SceneIdentifierFromCtorSignature = "(I)V"; - jint jniSceneIdentifierFrom = static_cast(dataResponse.sceneIdentifierFrom); - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), - SceneIdentifierFromCtorSignature.c_str(), jniSceneIdentifierFrom, - SceneIdentifierFrom); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupIdentifierFrom, SceneIdentifierFrom); + env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, WiFiScanResults, ThreadScanResults); } -CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CHIPNetworkCommissioningClusterNetworkConfigResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1269,7 +1025,7 @@ CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareU } } -CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback() +CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::~CHIPNetworkCommissioningClusterNetworkConfigResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1280,9 +1036,8 @@ CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::~CHIPOtaSoftware env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & dataResponse) +void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1292,10 +1047,10 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -1304,127 +1059,81 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( err = JniReferences::GetInstance().FindMethod( env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject DelayedActionTime; - if (!dataResponse.delayedActionTime.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DelayedActionTime); - } - else - { - jobject DelayedActionTimeInsideOptional; - std::string DelayedActionTimeInsideOptionalClassName = "java/lang/Long"; - std::string DelayedActionTimeInsideOptionalCtorSignature = "(J)V"; - jlong jniDelayedActionTimeInsideOptional = static_cast(dataResponse.delayedActionTime.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - DelayedActionTimeInsideOptionalClassName.c_str(), DelayedActionTimeInsideOptionalCtorSignature.c_str(), - jniDelayedActionTimeInsideOptional, DelayedActionTimeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(DelayedActionTimeInsideOptional, DelayedActionTime); - } - jobject ImageURI; - if (!dataResponse.imageURI.HasValue()) + jobject NetworkingStatus; + std::string NetworkingStatusClassName = "java/lang/Integer"; + std::string NetworkingStatusCtorSignature = "(I)V"; + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); + jobject DebugText; + if (!dataResponse.debugText.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ImageURI); + chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); } else { - jobject ImageURIInsideOptional; + jobject DebugTextInsideOptional; LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.imageURI.Value(), ImageURIInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(ImageURIInsideOptional, ImageURI); - } - jobject SoftwareVersion; - if (!dataResponse.softwareVersion.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersion); - } - else - { - jobject SoftwareVersionInsideOptional; - std::string SoftwareVersionInsideOptionalClassName = "java/lang/Long"; - std::string SoftwareVersionInsideOptionalCtorSignature = "(J)V"; - jlong jniSoftwareVersionInsideOptional = static_cast(dataResponse.softwareVersion.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - SoftwareVersionInsideOptionalClassName.c_str(), SoftwareVersionInsideOptionalCtorSignature.c_str(), - jniSoftwareVersionInsideOptional, SoftwareVersionInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionInsideOptional, SoftwareVersion); - } - jobject SoftwareVersionString; - if (!dataResponse.softwareVersionString.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, SoftwareVersionString); - } - else - { - jobject SoftwareVersionStringInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.softwareVersionString.Value(), - SoftwareVersionStringInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(SoftwareVersionStringInsideOptional, SoftwareVersionString); + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); } - jobject UpdateToken; - if (!dataResponse.updateToken.HasValue()) + jobject NetworkIndex; + if (!dataResponse.networkIndex.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UpdateToken); + chip::JniReferences::GetInstance().CreateOptional(nullptr, NetworkIndex); } else { - jobject UpdateTokenInsideOptional; - jbyteArray UpdateTokenInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.updateToken.Value().size())); - env->SetByteArrayRegion(UpdateTokenInsideOptionalByteArray, 0, static_cast(dataResponse.updateToken.Value().size()), - reinterpret_cast(dataResponse.updateToken.Value().data())); - UpdateTokenInsideOptional = UpdateTokenInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(UpdateTokenInsideOptional, UpdateToken); + jobject NetworkIndexInsideOptional; + std::string NetworkIndexInsideOptionalClassName = "java/lang/Integer"; + std::string NetworkIndexInsideOptionalCtorSignature = "(I)V"; + jint jniNetworkIndexInsideOptional = static_cast(dataResponse.networkIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(NetworkIndexInsideOptionalClassName.c_str(), + NetworkIndexInsideOptionalCtorSignature.c_str(), + jniNetworkIndexInsideOptional, NetworkIndexInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(NetworkIndexInsideOptional, NetworkIndex); } - jobject UserConsentNeeded; - if (!dataResponse.userConsentNeeded.HasValue()) + jobject ClientIdentity; + if (!dataResponse.clientIdentity.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UserConsentNeeded); + chip::JniReferences::GetInstance().CreateOptional(nullptr, ClientIdentity); } else { - jobject UserConsentNeededInsideOptional; - std::string UserConsentNeededInsideOptionalClassName = "java/lang/Boolean"; - std::string UserConsentNeededInsideOptionalCtorSignature = "(Z)V"; - jboolean jniUserConsentNeededInsideOptional = static_cast(dataResponse.userConsentNeeded.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - UserConsentNeededInsideOptionalClassName.c_str(), UserConsentNeededInsideOptionalCtorSignature.c_str(), - jniUserConsentNeededInsideOptional, UserConsentNeededInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(UserConsentNeededInsideOptional, UserConsentNeeded); + jobject ClientIdentityInsideOptional; + jbyteArray ClientIdentityInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.clientIdentity.Value().size())); + env->SetByteArrayRegion(ClientIdentityInsideOptionalByteArray, 0, + static_cast(dataResponse.clientIdentity.Value().size()), + reinterpret_cast(dataResponse.clientIdentity.Value().data())); + ClientIdentityInsideOptional = ClientIdentityInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(ClientIdentityInsideOptional, ClientIdentity); } - jobject MetadataForRequestor; - if (!dataResponse.metadataForRequestor.HasValue()) + jobject PossessionSignature; + if (!dataResponse.possessionSignature.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, MetadataForRequestor); + chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); } else { - jobject MetadataForRequestorInsideOptional; - jbyteArray MetadataForRequestorInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.metadataForRequestor.Value().size())); - env->SetByteArrayRegion(MetadataForRequestorInsideOptionalByteArray, 0, - static_cast(dataResponse.metadataForRequestor.Value().size()), - reinterpret_cast(dataResponse.metadataForRequestor.Value().data())); - MetadataForRequestorInsideOptional = MetadataForRequestorInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(MetadataForRequestorInsideOptional, MetadataForRequestor); + jobject PossessionSignatureInsideOptional; + jbyteArray PossessionSignatureInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); + env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, + static_cast(dataResponse.possessionSignature.Value().size()), + reinterpret_cast(dataResponse.possessionSignature.Value().data())); + PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, DelayedActionTime, ImageURI, SoftwareVersion, SoftwareVersionString, - UpdateToken, UserConsentNeeded, MetadataForRequestor); + env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, NetworkIndex, ClientIdentity, + PossessionSignature); } -CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CHIPNetworkCommissioningClusterConnectNetworkResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1440,7 +1149,7 @@ CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CHIPOtaSoftware } } -CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::~CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback() +CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::~CHIPNetworkCommissioningClusterConnectNetworkResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1451,9 +1160,8 @@ CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::~CHIPOtaSoftwar env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & dataResponse) +void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1463,37 +1171,56 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Action; - std::string ActionClassName = "java/lang/Integer"; - std::string ActionCtorSignature = "(I)V"; - jint jniAction = static_cast(dataResponse.action); - chip::JniReferences::GetInstance().CreateBoxedObject(ActionClassName.c_str(), ActionCtorSignature.c_str(), jniAction, - Action); - jobject DelayedActionTime; - std::string DelayedActionTimeClassName = "java/lang/Long"; - std::string DelayedActionTimeCtorSignature = "(J)V"; - jlong jniDelayedActionTime = static_cast(dataResponse.delayedActionTime); - chip::JniReferences::GetInstance().CreateBoxedObject( - DelayedActionTimeClassName.c_str(), DelayedActionTimeCtorSignature.c_str(), jniDelayedActionTime, DelayedActionTime); + jobject NetworkingStatus; + std::string NetworkingStatusClassName = "java/lang/Integer"; + std::string NetworkingStatusCtorSignature = "(I)V"; + jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); + jobject DebugText; + if (!dataResponse.debugText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); + } + else + { + jobject DebugTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); + } + jobject ErrorValue; + if (dataResponse.errorValue.IsNull()) + { + ErrorValue = nullptr; + } + else + { + std::string ErrorValueClassName = "java/lang/Long"; + std::string ErrorValueCtorSignature = "(J)V"; + jlong jniErrorValue = static_cast(dataResponse.errorValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), + jniErrorValue, ErrorValue); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, Action, DelayedActionTime); + env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, ErrorValue); } -CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CHIPGeneralCommissioningClusterArmFailSafeResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CHIPNetworkCommissioningClusterQueryIdentityResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1509,7 +1236,7 @@ CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CHIPGeneralCommissio } } -CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::~CHIPGeneralCommissioningClusterArmFailSafeResponseCallback() +CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1520,8 +1247,8 @@ CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::~CHIPGeneralCommissi env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & dataResponse) +void CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1531,34 +1258,45 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([BLjava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); + jobject Identity; + jbyteArray IdentityByteArray = env->NewByteArray(static_cast(dataResponse.identity.size())); + env->SetByteArrayRegion(IdentityByteArray, 0, static_cast(dataResponse.identity.size()), + reinterpret_cast(dataResponse.identity.data())); + Identity = IdentityByteArray; + jobject PossessionSignature; + if (!dataResponse.possessionSignature.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); + } + else + { + jobject PossessionSignatureInsideOptional; + jbyteArray PossessionSignatureInsideOptionalByteArray = + env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); + env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, + static_cast(dataResponse.possessionSignature.Value().size()), + reinterpret_cast(dataResponse.possessionSignature.Value().data())); + PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Identity, PossessionSignature); } -CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: - CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1574,8 +1312,7 @@ CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: } } -CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: - ~CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback() +CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::~CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1586,9 +1323,8 @@ CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & dataResponse) +void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1598,34 +1334,68 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;[BLjava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject LogContent; + jbyteArray LogContentByteArray = env->NewByteArray(static_cast(dataResponse.logContent.size())); + env->SetByteArrayRegion(LogContentByteArray, 0, static_cast(dataResponse.logContent.size()), + reinterpret_cast(dataResponse.logContent.data())); + LogContent = LogContentByteArray; + jobject UTCTimeStamp; + if (!dataResponse.UTCTimeStamp.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, UTCTimeStamp); + } + else + { + jobject UTCTimeStampInsideOptional; + std::string UTCTimeStampInsideOptionalClassName = "java/lang/Long"; + std::string UTCTimeStampInsideOptionalCtorSignature = "(J)V"; + jlong jniUTCTimeStampInsideOptional = static_cast(dataResponse.UTCTimeStamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(UTCTimeStampInsideOptionalClassName.c_str(), + UTCTimeStampInsideOptionalCtorSignature.c_str(), + jniUTCTimeStampInsideOptional, UTCTimeStampInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(UTCTimeStampInsideOptional, UTCTimeStamp); + } + jobject TimeSinceBoot; + if (!dataResponse.timeSinceBoot.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, TimeSinceBoot); + } + else + { + jobject TimeSinceBootInsideOptional; + std::string TimeSinceBootInsideOptionalClassName = "java/lang/Long"; + std::string TimeSinceBootInsideOptionalCtorSignature = "(J)V"; + jlong jniTimeSinceBootInsideOptional = static_cast(dataResponse.timeSinceBoot.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TimeSinceBootInsideOptionalClassName.c_str(), + TimeSinceBootInsideOptionalCtorSignature.c_str(), + jniTimeSinceBootInsideOptional, TimeSinceBootInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(TimeSinceBootInsideOptional, TimeSinceBoot); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, LogContent, UTCTimeStamp, TimeSinceBoot); } -CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: - CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1641,8 +1411,7 @@ CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: } } -CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: - ~CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback() +CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::~CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1653,9 +1422,8 @@ CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & dataResponse) +void CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1665,33 +1433,44 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/String;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject ErrorCode; - std::string ErrorCodeClassName = "java/lang/Integer"; - std::string ErrorCodeCtorSignature = "(I)V"; - jint jniErrorCode = static_cast(dataResponse.errorCode); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorCodeClassName.c_str(), ErrorCodeCtorSignature.c_str(), - jniErrorCode, ErrorCode); - jobject DebugText; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText, DebugText)); + jobject SystemTimeMs; + std::string SystemTimeMsClassName = "java/lang/Long"; + std::string SystemTimeMsCtorSignature = "(J)V"; + jlong jniSystemTimeMs = static_cast(dataResponse.systemTimeMs); + chip::JniReferences::GetInstance().CreateBoxedObject(SystemTimeMsClassName.c_str(), SystemTimeMsCtorSignature.c_str(), + jniSystemTimeMs, SystemTimeMs); + jobject PosixTimeMs; + if (dataResponse.posixTimeMs.IsNull()) + { + PosixTimeMs = nullptr; + } + else + { + std::string PosixTimeMsClassName = "java/lang/Long"; + std::string PosixTimeMsCtorSignature = "(J)V"; + jlong jniPosixTimeMs = static_cast(dataResponse.posixTimeMs.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(PosixTimeMsClassName.c_str(), PosixTimeMsCtorSignature.c_str(), + jniPosixTimeMs, PosixTimeMs); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, ErrorCode, DebugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, SystemTimeMs, PosixTimeMs); } -CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CHIPNetworkCommissioningClusterScanNetworksResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1707,7 +1486,7 @@ CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CHIPNetworkCommissi } } -CHIPNetworkCommissioningClusterScanNetworksResponseCallback::~CHIPNetworkCommissioningClusterScanNetworksResponseCallback() +CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1718,234 +1497,41 @@ CHIPNetworkCommissioningClusterScanNetworksResponseCallback::~CHIPNetworkCommiss env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & dataResponse) +void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - jobject WiFiScanResults; - if (!dataResponse.wiFiScanResults.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, WiFiScanResults); - } - else - { - jobject WiFiScanResultsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(WiFiScanResultsInsideOptional); - - auto iter_WiFiScanResultsInsideOptional_1 = dataResponse.wiFiScanResults.Value().begin(); - while (iter_WiFiScanResultsInsideOptional_1.Next()) - { - auto & entry_1 = iter_WiFiScanResultsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_security; - std::string newElement_1_securityClassName = "java/lang/Integer"; - std::string newElement_1_securityCtorSignature = "(I)V"; - jint jninewElement_1_security = static_cast(entry_1.security.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_securityClassName.c_str(), - newElement_1_securityCtorSignature.c_str(), - jninewElement_1_security, newElement_1_security); - jobject newElement_1_ssid; - jbyteArray newElement_1_ssidByteArray = env->NewByteArray(static_cast(entry_1.ssid.size())); - env->SetByteArrayRegion(newElement_1_ssidByteArray, 0, static_cast(entry_1.ssid.size()), - reinterpret_cast(entry_1.ssid.data())); - newElement_1_ssid = newElement_1_ssidByteArray; - jobject newElement_1_bssid; - jbyteArray newElement_1_bssidByteArray = env->NewByteArray(static_cast(entry_1.bssid.size())); - env->SetByteArrayRegion(newElement_1_bssidByteArray, 0, static_cast(entry_1.bssid.size()), - reinterpret_cast(entry_1.bssid.data())); - newElement_1_bssid = newElement_1_bssidByteArray; - jobject newElement_1_channel; - std::string newElement_1_channelClassName = "java/lang/Integer"; - std::string newElement_1_channelCtorSignature = "(I)V"; - jint jninewElement_1_channel = static_cast(entry_1.channel); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - jninewElement_1_channel, newElement_1_channel); - jobject newElement_1_wiFiBand; - std::string newElement_1_wiFiBandClassName = "java/lang/Integer"; - std::string newElement_1_wiFiBandCtorSignature = "(I)V"; - jint jninewElement_1_wiFiBand = static_cast(entry_1.wiFiBand); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_wiFiBandClassName.c_str(), - newElement_1_wiFiBandCtorSignature.c_str(), - jninewElement_1_wiFiBand, newElement_1_wiFiBand); - jobject newElement_1_rssi; - std::string newElement_1_rssiClassName = "java/lang/Integer"; - std::string newElement_1_rssiCtorSignature = "(I)V"; - jint jninewElement_1_rssi = static_cast(entry_1.rssi); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), - newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, - newElement_1_rssi); - - jclass wiFiInterfaceScanResultStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); - return; - } - - jmethodID wiFiInterfaceScanResultStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, wiFiInterfaceScanResultStructStructClass_2, "", - "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &wiFiInterfaceScanResultStructStructCtor_2); - if (err != CHIP_NO_ERROR || wiFiInterfaceScanResultStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); - return; - } - - newElement_1 = env->NewObject(wiFiInterfaceScanResultStructStructClass_2, wiFiInterfaceScanResultStructStructCtor_2, - newElement_1_security, newElement_1_ssid, newElement_1_bssid, newElement_1_channel, - newElement_1_wiFiBand, newElement_1_rssi); - chip::JniReferences::GetInstance().AddToList(WiFiScanResultsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(WiFiScanResultsInsideOptional, WiFiScanResults); - } - jobject ThreadScanResults; - if (!dataResponse.threadScanResults.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ThreadScanResults); - } - else - { - jobject ThreadScanResultsInsideOptional; - chip::JniReferences::GetInstance().CreateArrayList(ThreadScanResultsInsideOptional); - - auto iter_ThreadScanResultsInsideOptional_1 = dataResponse.threadScanResults.Value().begin(); - while (iter_ThreadScanResultsInsideOptional_1.Next()) - { - auto & entry_1 = iter_ThreadScanResultsInsideOptional_1.GetValue(); - jobject newElement_1; - jobject newElement_1_panId; - std::string newElement_1_panIdClassName = "java/lang/Integer"; - std::string newElement_1_panIdCtorSignature = "(I)V"; - jint jninewElement_1_panId = static_cast(entry_1.panId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_panIdClassName.c_str(), - newElement_1_panIdCtorSignature.c_str(), - jninewElement_1_panId, newElement_1_panId); - jobject newElement_1_extendedPanId; - std::string newElement_1_extendedPanIdClassName = "java/lang/Long"; - std::string newElement_1_extendedPanIdCtorSignature = "(J)V"; - jlong jninewElement_1_extendedPanId = static_cast(entry_1.extendedPanId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_extendedPanIdClassName.c_str(), - newElement_1_extendedPanIdCtorSignature.c_str(), - jninewElement_1_extendedPanId, newElement_1_extendedPanId); - jobject newElement_1_networkName; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.networkName, newElement_1_networkName)); - jobject newElement_1_channel; - std::string newElement_1_channelClassName = "java/lang/Integer"; - std::string newElement_1_channelCtorSignature = "(I)V"; - jint jninewElement_1_channel = static_cast(entry_1.channel); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_channelClassName.c_str(), - newElement_1_channelCtorSignature.c_str(), - jninewElement_1_channel, newElement_1_channel); - jobject newElement_1_version; - std::string newElement_1_versionClassName = "java/lang/Integer"; - std::string newElement_1_versionCtorSignature = "(I)V"; - jint jninewElement_1_version = static_cast(entry_1.version); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_versionClassName.c_str(), - newElement_1_versionCtorSignature.c_str(), - jninewElement_1_version, newElement_1_version); - jobject newElement_1_extendedAddress; - jbyteArray newElement_1_extendedAddressByteArray = - env->NewByteArray(static_cast(entry_1.extendedAddress.size())); - env->SetByteArrayRegion(newElement_1_extendedAddressByteArray, 0, static_cast(entry_1.extendedAddress.size()), - reinterpret_cast(entry_1.extendedAddress.data())); - newElement_1_extendedAddress = newElement_1_extendedAddressByteArray; - jobject newElement_1_rssi; - std::string newElement_1_rssiClassName = "java/lang/Integer"; - std::string newElement_1_rssiCtorSignature = "(I)V"; - jint jninewElement_1_rssi = static_cast(entry_1.rssi); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rssiClassName.c_str(), - newElement_1_rssiCtorSignature.c_str(), jninewElement_1_rssi, - newElement_1_rssi); - jobject newElement_1_lqi; - std::string newElement_1_lqiClassName = "java/lang/Integer"; - std::string newElement_1_lqiCtorSignature = "(I)V"; - jint jninewElement_1_lqi = static_cast(entry_1.lqi); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_lqiClassName.c_str(), newElement_1_lqiCtorSignature.c_str(), jninewElement_1_lqi, newElement_1_lqi); + jmethodID javaMethod; - jclass threadInterfaceScanResultStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); - return; - } + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - jmethodID threadInterfaceScanResultStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, threadInterfaceScanResultStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/" - "Integer;Ljava/lang/Integer;)V", - &threadInterfaceScanResultStructStructCtor_2); - if (err != CHIP_NO_ERROR || threadInterfaceScanResultStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); - return; - } + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - newElement_1 = - env->NewObject(threadInterfaceScanResultStructStructClass_2, threadInterfaceScanResultStructStructCtor_2, - newElement_1_panId, newElement_1_extendedPanId, newElement_1_networkName, newElement_1_channel, - newElement_1_version, newElement_1_extendedAddress, newElement_1_rssi, newElement_1_lqi); - chip::JniReferences::GetInstance().AddToList(ThreadScanResultsInsideOptional, newElement_1); - } - chip::JniReferences::GetInstance().CreateOptional(ThreadScanResultsInsideOptional, ThreadScanResults); - } + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, WiFiScanResults, ThreadScanResults); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject DSTOffsetRequired; + std::string DSTOffsetRequiredClassName = "java/lang/Boolean"; + std::string DSTOffsetRequiredCtorSignature = "(Z)V"; + jboolean jniDSTOffsetRequired = static_cast(dataResponse.DSTOffsetRequired); + chip::JniReferences::GetInstance().CreateBoxedObject( + DSTOffsetRequiredClassName.c_str(), DSTOffsetRequiredCtorSignature.c_str(), jniDSTOffsetRequired, DSTOffsetRequired); + + env->CallVoidMethod(javaCallbackRef, javaMethod, DSTOffsetRequired); } -CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CHIPNetworkCommissioningClusterNetworkConfigResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPOperationalCredentialsClusterAttestationResponseCallback::CHIPOperationalCredentialsClusterAttestationResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1961,7 +1547,7 @@ CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CHIPNetworkCommiss } } -CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::~CHIPNetworkCommissioningClusterNetworkConfigResponseCallback() +CHIPOperationalCredentialsClusterAttestationResponseCallback::~CHIPOperationalCredentialsClusterAttestationResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1972,8 +1558,8 @@ CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::~CHIPNetworkCommis env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & dataResponse) +void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1983,93 +1569,162 @@ void CHIPNetworkCommissioningClusterNetworkConfigResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); - jobject DebugText; - if (!dataResponse.debugText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); - } - else - { - jobject DebugTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); - } - jobject NetworkIndex; - if (!dataResponse.networkIndex.HasValue()) + jobject AttestationElements; + jbyteArray AttestationElementsByteArray = env->NewByteArray(static_cast(dataResponse.attestationElements.size())); + env->SetByteArrayRegion(AttestationElementsByteArray, 0, static_cast(dataResponse.attestationElements.size()), + reinterpret_cast(dataResponse.attestationElements.data())); + AttestationElements = AttestationElementsByteArray; + jobject AttestationSignature; + jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); + env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), + reinterpret_cast(dataResponse.attestationSignature.data())); + AttestationSignature = AttestationSignatureByteArray; + + env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, AttestationSignature); +} +CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: + CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, NetworkIndex); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - else + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { - jobject NetworkIndexInsideOptional; - std::string NetworkIndexInsideOptionalClassName = "java/lang/Integer"; - std::string NetworkIndexInsideOptionalCtorSignature = "(I)V"; - jint jniNetworkIndexInsideOptional = static_cast(dataResponse.networkIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(NetworkIndexInsideOptionalClassName.c_str(), - NetworkIndexInsideOptionalCtorSignature.c_str(), - jniNetworkIndexInsideOptional, NetworkIndexInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(NetworkIndexInsideOptional, NetworkIndex); + ChipLogError(Zcl, "Could not create global reference for Java callback"); } - jobject ClientIdentity; - if (!dataResponse.clientIdentity.HasValue()) +} + +CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: + ~CHIPOperationalCredentialsClusterCertificateChainResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, ClientIdentity); + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; } - else + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Certificate; + jbyteArray CertificateByteArray = env->NewByteArray(static_cast(dataResponse.certificate.size())); + env->SetByteArrayRegion(CertificateByteArray, 0, static_cast(dataResponse.certificate.size()), + reinterpret_cast(dataResponse.certificate.data())); + Certificate = CertificateByteArray; + + env->CallVoidMethod(javaCallbackRef, javaMethod, Certificate); +} +CHIPOperationalCredentialsClusterCSRResponseCallback::CHIPOperationalCredentialsClusterCSRResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - jobject ClientIdentityInsideOptional; - jbyteArray ClientIdentityInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.clientIdentity.Value().size())); - env->SetByteArrayRegion(ClientIdentityInsideOptionalByteArray, 0, - static_cast(dataResponse.clientIdentity.Value().size()), - reinterpret_cast(dataResponse.clientIdentity.Value().data())); - ClientIdentityInsideOptional = ClientIdentityInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(ClientIdentityInsideOptional, ClientIdentity); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - jobject PossessionSignature; - if (!dataResponse.possessionSignature.HasValue()) + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); + ChipLogError(Zcl, "Could not create global reference for Java callback"); } - else +} + +CHIPOperationalCredentialsClusterCSRResponseCallback::~CHIPOperationalCredentialsClusterCSRResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - jobject PossessionSignatureInsideOptional; - jbyteArray PossessionSignatureInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); - env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, - static_cast(dataResponse.possessionSignature.Value().size()), - reinterpret_cast(dataResponse.possessionSignature.Value().data())); - PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; } + env->DeleteGlobalRef(javaCallbackRef); +}; - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, NetworkIndex, ClientIdentity, - PossessionSignature); +void CHIPOperationalCredentialsClusterCSRResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject NOCSRElements; + jbyteArray NOCSRElementsByteArray = env->NewByteArray(static_cast(dataResponse.NOCSRElements.size())); + env->SetByteArrayRegion(NOCSRElementsByteArray, 0, static_cast(dataResponse.NOCSRElements.size()), + reinterpret_cast(dataResponse.NOCSRElements.data())); + NOCSRElements = NOCSRElementsByteArray; + jobject AttestationSignature; + jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); + env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), + reinterpret_cast(dataResponse.attestationSignature.data())); + AttestationSignature = AttestationSignatureByteArray; + + env->CallVoidMethod(javaCallbackRef, javaMethod, NOCSRElements, AttestationSignature); } -CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CHIPNetworkCommissioningClusterConnectNetworkResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPOperationalCredentialsClusterNOCResponseCallback::CHIPOperationalCredentialsClusterNOCResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2085,7 +1740,7 @@ CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CHIPNetworkCommis } } -CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::~CHIPNetworkCommissioningClusterConnectNetworkResponseCallback() +CHIPOperationalCredentialsClusterNOCResponseCallback::~CHIPOperationalCredentialsClusterNOCResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2096,8 +1751,8 @@ CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::~CHIPNetworkCommi env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & dataResponse) +void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2107,10 +1762,10 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -2118,15 +1773,31 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Long;)V", &javaMethod); + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject NetworkingStatus; - std::string NetworkingStatusClassName = "java/lang/Integer"; - std::string NetworkingStatusCtorSignature = "(I)V"; - jint jniNetworkingStatus = static_cast(dataResponse.networkingStatus); - chip::JniReferences::GetInstance().CreateBoxedObject( - NetworkingStatusClassName.c_str(), NetworkingStatusCtorSignature.c_str(), jniNetworkingStatus, NetworkingStatus); + jobject StatusCode; + std::string StatusCodeClassName = "java/lang/Integer"; + std::string StatusCodeCtorSignature = "(I)V"; + jint jniStatusCode = static_cast(dataResponse.statusCode); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), + jniStatusCode, StatusCode); + jobject FabricIndex; + if (!dataResponse.fabricIndex.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, FabricIndex); + } + else + { + jobject FabricIndexInsideOptional; + std::string FabricIndexInsideOptionalClassName = "java/lang/Integer"; + std::string FabricIndexInsideOptionalCtorSignature = "(I)V"; + jint jniFabricIndexInsideOptional = static_cast(dataResponse.fabricIndex.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexInsideOptionalClassName.c_str(), + FabricIndexInsideOptionalCtorSignature.c_str(), + jniFabricIndexInsideOptional, FabricIndexInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(FabricIndexInsideOptional, FabricIndex); + } jobject DebugText; if (!dataResponse.debugText.HasValue()) { @@ -2139,24 +1810,11 @@ void CHIPNetworkCommissioningClusterConnectNetworkResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); } - jobject ErrorValue; - if (dataResponse.errorValue.IsNull()) - { - ErrorValue = nullptr; - } - else - { - std::string ErrorValueClassName = "java/lang/Long"; - std::string ErrorValueCtorSignature = "(J)V"; - jlong jniErrorValue = static_cast(dataResponse.errorValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorValueClassName.c_str(), ErrorValueCtorSignature.c_str(), - jniErrorValue, ErrorValue); - } - env->CallVoidMethod(javaCallbackRef, javaMethod, NetworkingStatus, DebugText, ErrorValue); + env->CallVoidMethod(javaCallbackRef, javaMethod, StatusCode, FabricIndex, DebugText); } -CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CHIPNetworkCommissioningClusterQueryIdentityResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CHIPGroupKeyManagementClusterKeySetReadResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2172,7 +1830,7 @@ CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CHIPNetworkCommiss } } -CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::~CHIPNetworkCommissioningClusterQueryIdentityResponseCallback() +CHIPGroupKeyManagementClusterKeySetReadResponseCallback::~CHIPGroupKeyManagementClusterKeySetReadResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2183,8 +1841,8 @@ CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::~CHIPNetworkCommis env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType & dataResponse) +void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2194,144 +1852,151 @@ void CHIPNetworkCommissioningClusterQueryIdentityResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([BLjava/util/Optional;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Identity; - jbyteArray IdentityByteArray = env->NewByteArray(static_cast(dataResponse.identity.size())); - env->SetByteArrayRegion(IdentityByteArray, 0, static_cast(dataResponse.identity.size()), - reinterpret_cast(dataResponse.identity.data())); - Identity = IdentityByteArray; - jobject PossessionSignature; - if (!dataResponse.possessionSignature.HasValue()) + jobject GroupKeySet; + jobject GroupKeySet_groupKeySetID; + std::string GroupKeySet_groupKeySetIDClassName = "java/lang/Integer"; + std::string GroupKeySet_groupKeySetIDCtorSignature = "(I)V"; + jint jniGroupKeySet_groupKeySetID = static_cast(dataResponse.groupKeySet.groupKeySetID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_groupKeySetIDClassName.c_str(), + GroupKeySet_groupKeySetIDCtorSignature.c_str(), + jniGroupKeySet_groupKeySetID, GroupKeySet_groupKeySetID); + jobject GroupKeySet_groupKeySecurityPolicy; + std::string GroupKeySet_groupKeySecurityPolicyClassName = "java/lang/Integer"; + std::string GroupKeySet_groupKeySecurityPolicyCtorSignature = "(I)V"; + jint jniGroupKeySet_groupKeySecurityPolicy = static_cast(dataResponse.groupKeySet.groupKeySecurityPolicy); + chip::JniReferences::GetInstance().CreateBoxedObject( + GroupKeySet_groupKeySecurityPolicyClassName.c_str(), GroupKeySet_groupKeySecurityPolicyCtorSignature.c_str(), + jniGroupKeySet_groupKeySecurityPolicy, GroupKeySet_groupKeySecurityPolicy); + jobject GroupKeySet_epochKey0; + if (dataResponse.groupKeySet.epochKey0.IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, PossessionSignature); + GroupKeySet_epochKey0 = nullptr; } else { - jobject PossessionSignatureInsideOptional; - jbyteArray PossessionSignatureInsideOptionalByteArray = - env->NewByteArray(static_cast(dataResponse.possessionSignature.Value().size())); - env->SetByteArrayRegion(PossessionSignatureInsideOptionalByteArray, 0, - static_cast(dataResponse.possessionSignature.Value().size()), - reinterpret_cast(dataResponse.possessionSignature.Value().data())); - PossessionSignatureInsideOptional = PossessionSignatureInsideOptionalByteArray; - chip::JniReferences::GetInstance().CreateOptional(PossessionSignatureInsideOptional, PossessionSignature); + jbyteArray GroupKeySet_epochKey0ByteArray = + env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey0.Value().size())); + env->SetByteArrayRegion(GroupKeySet_epochKey0ByteArray, 0, + static_cast(dataResponse.groupKeySet.epochKey0.Value().size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey0.Value().data())); + GroupKeySet_epochKey0 = GroupKeySet_epochKey0ByteArray; } - - env->CallVoidMethod(javaCallbackRef, javaMethod, Identity, PossessionSignature); -} -CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) + jobject GroupKeySet_epochStartTime0; + if (dataResponse.groupKeySet.epochStartTime0.IsNull()) { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; + GroupKeySet_epochStartTime0 = nullptr; } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) + else { - ChipLogError(Zcl, "Could not create global reference for Java callback"); + std::string GroupKeySet_epochStartTime0ClassName = "java/lang/Long"; + std::string GroupKeySet_epochStartTime0CtorSignature = "(J)V"; + jlong jniGroupKeySet_epochStartTime0 = static_cast(dataResponse.groupKeySet.epochStartTime0.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime0ClassName.c_str(), + GroupKeySet_epochStartTime0CtorSignature.c_str(), + jniGroupKeySet_epochStartTime0, GroupKeySet_epochStartTime0); } -} - -CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::~CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) + jobject GroupKeySet_epochKey1; + if (dataResponse.groupKeySet.epochKey1.IsNull()) { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; + GroupKeySet_epochKey1 = nullptr; } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;[BLjava/util/Optional;Ljava/util/Optional;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject Status; - std::string StatusClassName = "java/lang/Integer"; - std::string StatusCtorSignature = "(I)V"; - jint jniStatus = static_cast(dataResponse.status); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, - Status); - jobject LogContent; - jbyteArray LogContentByteArray = env->NewByteArray(static_cast(dataResponse.logContent.size())); - env->SetByteArrayRegion(LogContentByteArray, 0, static_cast(dataResponse.logContent.size()), - reinterpret_cast(dataResponse.logContent.data())); - LogContent = LogContentByteArray; - jobject UTCTimeStamp; - if (!dataResponse.UTCTimeStamp.HasValue()) + else { - chip::JniReferences::GetInstance().CreateOptional(nullptr, UTCTimeStamp); + jbyteArray GroupKeySet_epochKey1ByteArray = + env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey1.Value().size())); + env->SetByteArrayRegion(GroupKeySet_epochKey1ByteArray, 0, + static_cast(dataResponse.groupKeySet.epochKey1.Value().size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey1.Value().data())); + GroupKeySet_epochKey1 = GroupKeySet_epochKey1ByteArray; + } + jobject GroupKeySet_epochStartTime1; + if (dataResponse.groupKeySet.epochStartTime1.IsNull()) + { + GroupKeySet_epochStartTime1 = nullptr; } else { - jobject UTCTimeStampInsideOptional; - std::string UTCTimeStampInsideOptionalClassName = "java/lang/Long"; - std::string UTCTimeStampInsideOptionalCtorSignature = "(J)V"; - jlong jniUTCTimeStampInsideOptional = static_cast(dataResponse.UTCTimeStamp.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(UTCTimeStampInsideOptionalClassName.c_str(), - UTCTimeStampInsideOptionalCtorSignature.c_str(), - jniUTCTimeStampInsideOptional, UTCTimeStampInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(UTCTimeStampInsideOptional, UTCTimeStamp); + std::string GroupKeySet_epochStartTime1ClassName = "java/lang/Long"; + std::string GroupKeySet_epochStartTime1CtorSignature = "(J)V"; + jlong jniGroupKeySet_epochStartTime1 = static_cast(dataResponse.groupKeySet.epochStartTime1.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime1ClassName.c_str(), + GroupKeySet_epochStartTime1CtorSignature.c_str(), + jniGroupKeySet_epochStartTime1, GroupKeySet_epochStartTime1); + } + jobject GroupKeySet_epochKey2; + if (dataResponse.groupKeySet.epochKey2.IsNull()) + { + GroupKeySet_epochKey2 = nullptr; + } + else + { + jbyteArray GroupKeySet_epochKey2ByteArray = + env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey2.Value().size())); + env->SetByteArrayRegion(GroupKeySet_epochKey2ByteArray, 0, + static_cast(dataResponse.groupKeySet.epochKey2.Value().size()), + reinterpret_cast(dataResponse.groupKeySet.epochKey2.Value().data())); + GroupKeySet_epochKey2 = GroupKeySet_epochKey2ByteArray; + } + jobject GroupKeySet_epochStartTime2; + if (dataResponse.groupKeySet.epochStartTime2.IsNull()) + { + GroupKeySet_epochStartTime2 = nullptr; + } + else + { + std::string GroupKeySet_epochStartTime2ClassName = "java/lang/Long"; + std::string GroupKeySet_epochStartTime2CtorSignature = "(J)V"; + jlong jniGroupKeySet_epochStartTime2 = static_cast(dataResponse.groupKeySet.epochStartTime2.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime2ClassName.c_str(), + GroupKeySet_epochStartTime2CtorSignature.c_str(), + jniGroupKeySet_epochStartTime2, GroupKeySet_epochStartTime2); } - jobject TimeSinceBoot; - if (!dataResponse.timeSinceBoot.HasValue()) + + jclass groupKeySetStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct", groupKeySetStructStructClass_0); + if (err != CHIP_NO_ERROR) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, TimeSinceBoot); + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeySetStruct"); + return; } - else + + jmethodID groupKeySetStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, groupKeySetStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;[BLjava/lang/Long;[BLjava/lang/Long;)V", + &groupKeySetStructStructCtor_0); + if (err != CHIP_NO_ERROR || groupKeySetStructStructCtor_0 == nullptr) { - jobject TimeSinceBootInsideOptional; - std::string TimeSinceBootInsideOptionalClassName = "java/lang/Long"; - std::string TimeSinceBootInsideOptionalCtorSignature = "(J)V"; - jlong jniTimeSinceBootInsideOptional = static_cast(dataResponse.timeSinceBoot.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(TimeSinceBootInsideOptionalClassName.c_str(), - TimeSinceBootInsideOptionalCtorSignature.c_str(), - jniTimeSinceBootInsideOptional, TimeSinceBootInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(TimeSinceBootInsideOptional, TimeSinceBoot); + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeySetStruct constructor"); + return; } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, LogContent, UTCTimeStamp, TimeSinceBoot); + GroupKeySet = + env->NewObject(groupKeySetStructStructClass_0, groupKeySetStructStructCtor_0, GroupKeySet_groupKeySetID, + GroupKeySet_groupKeySecurityPolicy, GroupKeySet_epochKey0, GroupKeySet_epochStartTime0, + GroupKeySet_epochKey1, GroupKeySet_epochStartTime1, GroupKeySet_epochKey2, GroupKeySet_epochStartTime2); + + env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySet); } -CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: + CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2347,7 +2012,8 @@ CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CHIPGeneralDiagnostic } } -CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::~CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback() +CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: + ~CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2358,8 +2024,9 @@ CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::~CHIPGeneralDiagnosti env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType & dataResponse) +void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2369,44 +2036,39 @@ void CHIPGeneralDiagnosticsClusterTimeSnapshotResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;Ljava/lang/Long;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject SystemTimeMs; - std::string SystemTimeMsClassName = "java/lang/Long"; - std::string SystemTimeMsCtorSignature = "(J)V"; - jlong jniSystemTimeMs = static_cast(dataResponse.systemTimeMs); - chip::JniReferences::GetInstance().CreateBoxedObject(SystemTimeMsClassName.c_str(), SystemTimeMsCtorSignature.c_str(), - jniSystemTimeMs, SystemTimeMs); - jobject PosixTimeMs; - if (dataResponse.posixTimeMs.IsNull()) - { - PosixTimeMs = nullptr; - } - else + jobject GroupKeySetIDs; + chip::JniReferences::GetInstance().CreateArrayList(GroupKeySetIDs); + + auto iter_GroupKeySetIDs_0 = dataResponse.groupKeySetIDs.begin(); + while (iter_GroupKeySetIDs_0.Next()) { - std::string PosixTimeMsClassName = "java/lang/Long"; - std::string PosixTimeMsCtorSignature = "(J)V"; - jlong jniPosixTimeMs = static_cast(dataResponse.posixTimeMs.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(PosixTimeMsClassName.c_str(), PosixTimeMsCtorSignature.c_str(), - jniPosixTimeMs, PosixTimeMs); + auto & entry_0 = iter_GroupKeySetIDs_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(GroupKeySetIDs, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, SystemTimeMs, PosixTimeMs); + env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySetIDs); } -CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPIcdManagementClusterRegisterClientResponseCallback::CHIPIcdManagementClusterRegisterClientResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2422,7 +2084,7 @@ CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CHIPTimeSynchronizati } } -CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::~CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback() +CHIPIcdManagementClusterRegisterClientResponseCallback::~CHIPIcdManagementClusterRegisterClientResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2433,8 +2095,8 @@ CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::~CHIPTimeSynchronizat env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType & dataResponse) +void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2444,30 +2106,30 @@ void CHIPTimeSynchronizationClusterSetTimeZoneResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject DSTOffsetRequired; - std::string DSTOffsetRequiredClassName = "java/lang/Boolean"; - std::string DSTOffsetRequiredCtorSignature = "(Z)V"; - jboolean jniDSTOffsetRequired = static_cast(dataResponse.DSTOffsetRequired); - chip::JniReferences::GetInstance().CreateBoxedObject( - DSTOffsetRequiredClassName.c_str(), DSTOffsetRequiredCtorSignature.c_str(), jniDSTOffsetRequired, DSTOffsetRequired); + jobject ICDCounter; + std::string ICDCounterClassName = "java/lang/Long"; + std::string ICDCounterCtorSignature = "(J)V"; + jlong jniICDCounter = static_cast(dataResponse.ICDCounter); + chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), + jniICDCounter, ICDCounter); - env->CallVoidMethod(javaCallbackRef, javaMethod, DSTOffsetRequired); + env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); } -CHIPOperationalCredentialsClusterAttestationResponseCallback::CHIPOperationalCredentialsClusterAttestationResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2483,7 +2145,7 @@ CHIPOperationalCredentialsClusterAttestationResponseCallback::CHIPOperationalCre } } -CHIPOperationalCredentialsClusterAttestationResponseCallback::~CHIPOperationalCredentialsClusterAttestationResponseCallback() +CHIPIcdManagementClusterStayActiveResponseCallback::~CHIPIcdManagementClusterStayActiveResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2494,8 +2156,8 @@ CHIPOperationalCredentialsClusterAttestationResponseCallback::~CHIPOperationalCr env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & dataResponse) +void CHIPIcdManagementClusterStayActiveResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2505,35 +2167,32 @@ void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject AttestationElements; - jbyteArray AttestationElementsByteArray = env->NewByteArray(static_cast(dataResponse.attestationElements.size())); - env->SetByteArrayRegion(AttestationElementsByteArray, 0, static_cast(dataResponse.attestationElements.size()), - reinterpret_cast(dataResponse.attestationElements.data())); - AttestationElements = AttestationElementsByteArray; - jobject AttestationSignature; - jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); - env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), - reinterpret_cast(dataResponse.attestationSignature.data())); - AttestationSignature = AttestationSignatureByteArray; + jobject PromisedActiveDuration; + std::string PromisedActiveDurationClassName = "java/lang/Long"; + std::string PromisedActiveDurationCtorSignature = "(J)V"; + jlong jniPromisedActiveDuration = static_cast(dataResponse.promisedActiveDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(PromisedActiveDurationClassName.c_str(), + PromisedActiveDurationCtorSignature.c_str(), + jniPromisedActiveDuration, PromisedActiveDuration); - env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, AttestationSignature); + env->CallVoidMethod(javaCallbackRef, javaMethod, PromisedActiveDuration); } -CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: - CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: + CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2549,8 +2208,8 @@ CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: } } -CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: - ~CHIPOperationalCredentialsClusterCertificateChainResponseCallback() +CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: + ~CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2561,9 +2220,9 @@ CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::CallbackFn( +void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & dataResponse) + const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2573,29 +2232,83 @@ void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Lchip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject Certificate; - jbyteArray CertificateByteArray = env->NewByteArray(static_cast(dataResponse.certificate.size())); - env->SetByteArrayRegion(CertificateByteArray, 0, static_cast(dataResponse.certificate.size()), - reinterpret_cast(dataResponse.certificate.data())); - Certificate = CertificateByteArray; + jobject CommandResponseState; + jobject CommandResponseState_errorStateID; + std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; + std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; + jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), + jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); + jobject CommandResponseState_errorStateLabel; + if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); + } + else + { + jobject CommandResponseState_errorStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, + CommandResponseState_errorStateLabel); + } + jobject CommandResponseState_errorStateDetails; + if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); + } + else + { + jobject CommandResponseState_errorStateDetailsInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, + CommandResponseState_errorStateDetails); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, Certificate); + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); + return; + } + + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); + return; + } + + CommandResponseState = + env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, + CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); + + env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); } -CHIPOperationalCredentialsClusterCSRResponseCallback::CHIPOperationalCredentialsClusterCSRResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2611,7 +2324,7 @@ CHIPOperationalCredentialsClusterCSRResponseCallback::CHIPOperationalCredentials } } -CHIPOperationalCredentialsClusterCSRResponseCallback::~CHIPOperationalCredentialsClusterCSRResponseCallback() +CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToModeResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2622,8 +2335,8 @@ CHIPOperationalCredentialsClusterCSRResponseCallback::~CHIPOperationalCredential env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOperationalCredentialsClusterCSRResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & dataResponse) +void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2633,34 +2346,42 @@ void CHIPOperationalCredentialsClusterCSRResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B[B)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject NOCSRElements; - jbyteArray NOCSRElementsByteArray = env->NewByteArray(static_cast(dataResponse.NOCSRElements.size())); - env->SetByteArrayRegion(NOCSRElementsByteArray, 0, static_cast(dataResponse.NOCSRElements.size()), - reinterpret_cast(dataResponse.NOCSRElements.data())); - NOCSRElements = NOCSRElementsByteArray; - jobject AttestationSignature; - jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); - env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), - reinterpret_cast(dataResponse.attestationSignature.data())); - AttestationSignature = AttestationSignatureByteArray; + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, NOCSRElements, AttestationSignature); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); } -CHIPOperationalCredentialsClusterNOCResponseCallback::CHIPOperationalCredentialsClusterNOCResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeClusterChangeToModeResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2676,7 +2397,7 @@ CHIPOperationalCredentialsClusterNOCResponseCallback::CHIPOperationalCredentials } } -CHIPOperationalCredentialsClusterNOCResponseCallback::~CHIPOperationalCredentialsClusterNOCResponseCallback() +CHIPLaundryWasherModeClusterChangeToModeResponseCallback::~CHIPLaundryWasherModeClusterChangeToModeResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2687,8 +2408,8 @@ CHIPOperationalCredentialsClusterNOCResponseCallback::~CHIPOperationalCredential env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & dataResponse) +void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2698,59 +2419,44 @@ void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject StatusCode; - std::string StatusCodeClassName = "java/lang/Integer"; - std::string StatusCodeCtorSignature = "(I)V"; - jint jniStatusCode = static_cast(dataResponse.statusCode); - chip::JniReferences::GetInstance().CreateBoxedObject(StatusCodeClassName.c_str(), StatusCodeCtorSignature.c_str(), - jniStatusCode, StatusCode); - jobject FabricIndex; - if (!dataResponse.fabricIndex.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, FabricIndex); - } - else - { - jobject FabricIndexInsideOptional; - std::string FabricIndexInsideOptionalClassName = "java/lang/Integer"; - std::string FabricIndexInsideOptionalCtorSignature = "(I)V"; - jint jniFabricIndexInsideOptional = static_cast(dataResponse.fabricIndex.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(FabricIndexInsideOptionalClassName.c_str(), - FabricIndexInsideOptionalCtorSignature.c_str(), - jniFabricIndexInsideOptional, FabricIndexInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(FabricIndexInsideOptional, FabricIndex); - } - jobject DebugText; - if (!dataResponse.debugText.HasValue()) + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, DebugText); + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); } else { - jobject DebugTextInsideOptional; + jobject StatusTextInsideOptional; LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.debugText.Value(), DebugTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(DebugTextInsideOptional, DebugText); + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); } - env->CallVoidMethod(javaCallbackRef, javaMethod, StatusCode, FabricIndex, DebugText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); } -CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CHIPGroupKeyManagementClusterKeySetReadResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2766,7 +2472,8 @@ CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CHIPGroupKeyManagementC } } -CHIPGroupKeyManagementClusterKeySetReadResponseCallback::~CHIPGroupKeyManagementClusterKeySetReadResponseCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2777,8 +2484,10 @@ CHIPGroupKeyManagementClusterKeySetReadResponseCallback::~CHIPGroupKeyManagement env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & dataResponse) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & + dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2788,151 +2497,118 @@ void CHIPGroupKeyManagementClusterKeySetReadResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject GroupKeySet; - jobject GroupKeySet_groupKeySetID; - std::string GroupKeySet_groupKeySetIDClassName = "java/lang/Integer"; - std::string GroupKeySet_groupKeySetIDCtorSignature = "(I)V"; - jint jniGroupKeySet_groupKeySetID = static_cast(dataResponse.groupKeySet.groupKeySetID); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_groupKeySetIDClassName.c_str(), - GroupKeySet_groupKeySetIDCtorSignature.c_str(), - jniGroupKeySet_groupKeySetID, GroupKeySet_groupKeySetID); - jobject GroupKeySet_groupKeySecurityPolicy; - std::string GroupKeySet_groupKeySecurityPolicyClassName = "java/lang/Integer"; - std::string GroupKeySet_groupKeySecurityPolicyCtorSignature = "(I)V"; - jint jniGroupKeySet_groupKeySecurityPolicy = static_cast(dataResponse.groupKeySet.groupKeySecurityPolicy); - chip::JniReferences::GetInstance().CreateBoxedObject( - GroupKeySet_groupKeySecurityPolicyClassName.c_str(), GroupKeySet_groupKeySecurityPolicyCtorSignature.c_str(), - jniGroupKeySet_groupKeySecurityPolicy, GroupKeySet_groupKeySecurityPolicy); - jobject GroupKeySet_epochKey0; - if (dataResponse.groupKeySet.epochKey0.IsNull()) - { - GroupKeySet_epochKey0 = nullptr; - } - else - { - jbyteArray GroupKeySet_epochKey0ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey0.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey0ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey0.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey0.Value().data())); - GroupKeySet_epochKey0 = GroupKeySet_epochKey0ByteArray; - } - jobject GroupKeySet_epochStartTime0; - if (dataResponse.groupKeySet.epochStartTime0.IsNull()) - { - GroupKeySet_epochStartTime0 = nullptr; - } - else - { - std::string GroupKeySet_epochStartTime0ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime0CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime0 = static_cast(dataResponse.groupKeySet.epochStartTime0.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime0ClassName.c_str(), - GroupKeySet_epochStartTime0CtorSignature.c_str(), - jniGroupKeySet_epochStartTime0, GroupKeySet_epochStartTime0); - } - jobject GroupKeySet_epochKey1; - if (dataResponse.groupKeySet.epochKey1.IsNull()) - { - GroupKeySet_epochKey1 = nullptr; - } - else - { - jbyteArray GroupKeySet_epochKey1ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey1.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey1ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey1.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey1.Value().data())); - GroupKeySet_epochKey1 = GroupKeySet_epochKey1ByteArray; - } - jobject GroupKeySet_epochStartTime1; - if (dataResponse.groupKeySet.epochStartTime1.IsNull()) - { - GroupKeySet_epochStartTime1 = nullptr; - } - else - { - std::string GroupKeySet_epochStartTime1ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime1CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime1 = static_cast(dataResponse.groupKeySet.epochStartTime1.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime1ClassName.c_str(), - GroupKeySet_epochStartTime1CtorSignature.c_str(), - jniGroupKeySet_epochStartTime1, GroupKeySet_epochStartTime1); - } - jobject GroupKeySet_epochKey2; - if (dataResponse.groupKeySet.epochKey2.IsNull()) + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) { - GroupKeySet_epochKey2 = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); } else { - jbyteArray GroupKeySet_epochKey2ByteArray = - env->NewByteArray(static_cast(dataResponse.groupKeySet.epochKey2.Value().size())); - env->SetByteArrayRegion(GroupKeySet_epochKey2ByteArray, 0, - static_cast(dataResponse.groupKeySet.epochKey2.Value().size()), - reinterpret_cast(dataResponse.groupKeySet.epochKey2.Value().data())); - GroupKeySet_epochKey2 = GroupKeySet_epochKey2ByteArray; + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); } - jobject GroupKeySet_epochStartTime2; - if (dataResponse.groupKeySet.epochStartTime2.IsNull()) + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} +CHIPRvcRunModeClusterChangeToModeResponseCallback::CHIPRvcRunModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - GroupKeySet_epochStartTime2 = nullptr; + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - else + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { - std::string GroupKeySet_epochStartTime2ClassName = "java/lang/Long"; - std::string GroupKeySet_epochStartTime2CtorSignature = "(J)V"; - jlong jniGroupKeySet_epochStartTime2 = static_cast(dataResponse.groupKeySet.epochStartTime2.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(GroupKeySet_epochStartTime2ClassName.c_str(), - GroupKeySet_epochStartTime2CtorSignature.c_str(), - jniGroupKeySet_epochStartTime2, GroupKeySet_epochStartTime2); + ChipLogError(Zcl, "Could not create global reference for Java callback"); } +} - jclass groupKeySetStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeySetStruct", groupKeySetStructStructClass_0); - if (err != CHIP_NO_ERROR) +CHIPRvcRunModeClusterChangeToModeResponseCallback::~CHIPRvcRunModeClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeySetStruct"); + ChipLogError(Zcl, "Could not delete global reference for Java callback"); return; } + env->DeleteGlobalRef(javaCallbackRef); +}; - jmethodID groupKeySetStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, groupKeySetStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;[BLjava/lang/Long;[BLjava/lang/Long;[BLjava/lang/Long;)V", - &groupKeySetStructStructCtor_0); - if (err != CHIP_NO_ERROR || groupKeySetStructStructCtor_0 == nullptr) +void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeySetStruct constructor"); - return; + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); } - GroupKeySet = - env->NewObject(groupKeySetStructStructClass_0, groupKeySetStructStructCtor_0, GroupKeySet_groupKeySetID, - GroupKeySet_groupKeySecurityPolicy, GroupKeySet_epochKey0, GroupKeySet_epochStartTime0, - GroupKeySet_epochKey1, GroupKeySet_epochStartTime1, GroupKeySet_epochKey2, GroupKeySet_epochStartTime2); - - env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySet); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); } -CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: - CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPRvcCleanModeClusterChangeToModeResponseCallback::CHIPRvcCleanModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2948,8 +2624,7 @@ CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: } } -CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: - ~CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback() +CHIPRvcCleanModeClusterChangeToModeResponseCallback::~CHIPRvcCleanModeClusterChangeToModeResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2960,9 +2635,8 @@ CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & dataResponse) +void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2972,39 +2646,43 @@ void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject GroupKeySetIDs; - chip::JniReferences::GetInstance().CreateArrayList(GroupKeySetIDs); - - auto iter_GroupKeySetIDs_0 = dataResponse.groupKeySetIDs.begin(); - while (iter_GroupKeySetIDs_0.Next()) + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) { - auto & entry_0 = iter_GroupKeySetIDs_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(GroupKeySetIDs, newElement_0); + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); } - env->CallVoidMethod(javaCallbackRef, javaMethod, GroupKeySetIDs); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); } -CHIPIcdManagementClusterRegisterClientResponseCallback::CHIPIcdManagementClusterRegisterClientResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPDishwasherModeClusterChangeToModeResponseCallback::CHIPDishwasherModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3020,7 +2698,7 @@ CHIPIcdManagementClusterRegisterClientResponseCallback::CHIPIcdManagementCluster } } -CHIPIcdManagementClusterRegisterClientResponseCallback::~CHIPIcdManagementClusterRegisterClientResponseCallback() +CHIPDishwasherModeClusterChangeToModeResponseCallback::~CHIPDishwasherModeClusterChangeToModeResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3031,8 +2709,8 @@ CHIPIcdManagementClusterRegisterClientResponseCallback::~CHIPIcdManagementCluste env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & dataResponse) +void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3042,30 +2720,43 @@ void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject ICDCounter; - std::string ICDCounterClassName = "java/lang/Long"; - std::string ICDCounterCtorSignature = "(J)V"; - jlong jniICDCounter = static_cast(dataResponse.ICDCounter); - chip::JniReferences::GetInstance().CreateBoxedObject(ICDCounterClassName.c_str(), ICDCounterCtorSignature.c_str(), - jniICDCounter, ICDCounter); + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } - env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); } -CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPOperationalStateClusterOperationalCommandResponseCallback::CHIPOperationalStateClusterOperationalCommandResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3079,56 +2770,108 @@ CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStay { ChipLogError(Zcl, "Could not create global reference for Java callback"); } -} +} + +CHIPOperationalStateClusterOperationalCommandResponseCallback::~CHIPOperationalStateClusterOperationalCommandResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Lchip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject CommandResponseState; + jobject CommandResponseState_errorStateID; + std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; + std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; + jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), + jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); + jobject CommandResponseState_errorStateLabel; + if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); + } + else + { + jobject CommandResponseState_errorStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, + CommandResponseState_errorStateLabel); + } + jobject CommandResponseState_errorStateDetails; + if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); + } + else + { + jobject CommandResponseState_errorStateDetailsInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, + CommandResponseState_errorStateDetails); + } + + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); + return; + } -CHIPIcdManagementClusterStayActiveResponseCallback::~CHIPIcdManagementClusterStayActiveResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); return; } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPIcdManagementClusterStayActiveResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject PromisedActiveDuration; - std::string PromisedActiveDurationClassName = "java/lang/Long"; - std::string PromisedActiveDurationCtorSignature = "(J)V"; - jlong jniPromisedActiveDuration = static_cast(dataResponse.promisedActiveDuration); - chip::JniReferences::GetInstance().CreateBoxedObject(PromisedActiveDurationClassName.c_str(), - PromisedActiveDurationCtorSignature.c_str(), - jniPromisedActiveDuration, PromisedActiveDuration); + CommandResponseState = + env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, + CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); - env->CallVoidMethod(javaCallbackRef, javaMethod, PromisedActiveDuration); + env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); } -CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: - CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CHIPRvcOperationalStateClusterOperationalCommandResponseCallback( + jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3144,8 +2887,8 @@ CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: } } -CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: - ~CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback() +CHIPRvcOperationalStateClusterOperationalCommandResponseCallback:: + ~CHIPRvcOperationalStateClusterOperationalCommandResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3156,9 +2899,9 @@ CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( +void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( void * context, - const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) + const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3168,10 +2911,10 @@ void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::Ca VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3179,8 +2922,8 @@ void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::Ca VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Lchip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct;)V", &javaMethod); + env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject CommandResponseState; @@ -3220,10 +2963,10 @@ void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::Ca jclass errorStateStructStructClass_0; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); return; } @@ -3233,7 +2976,7 @@ void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::Ca &errorStateStructStructCtor_0); if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); return; } @@ -3243,8 +2986,8 @@ void CHIPOvenCavityOperationalStateClusterOperationalCommandResponseCallback::Ca env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); } -CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterAddSceneResponseCallback::CHIPScenesManagementClusterAddSceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3260,7 +3003,7 @@ CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToMode } } -CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterAddSceneResponseCallback::~CHIPScenesManagementClusterAddSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3271,8 +3014,8 @@ CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToMod env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterAddSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3282,17 +3025,18 @@ void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3301,23 +3045,23 @@ void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } -CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeClusterChangeToModeResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterViewSceneResponseCallback::CHIPScenesManagementClusterViewSceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3333,7 +3077,7 @@ CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeC } } -CHIPLaundryWasherModeClusterChangeToModeResponseCallback::~CHIPLaundryWasherModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterViewSceneResponseCallback::~CHIPScenesManagementClusterViewSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3344,8 +3088,8 @@ CHIPLaundryWasherModeClusterChangeToModeResponseCallback::~CHIPLaundryWasherMode env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterViewSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3355,18 +3099,20 @@ void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3375,24 +3121,146 @@ void CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); + jobject TransitionTime; + if (!dataResponse.transitionTime.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); } else { - jobject StatusTextInsideOptional; + jobject TransitionTimeInsideOptional; + std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; + std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; + jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), + TransitionTimeInsideOptionalCtorSignature.c_str(), + jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); + } + jobject SceneName; + if (!dataResponse.sceneName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); + } + else + { + jobject SceneNameInsideOptional; LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.sceneName.Value(), SceneNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); + } + jobject ExtensionFieldSets; + if (!dataResponse.extensionFieldSets.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); + } + else + { + jobject ExtensionFieldSetsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); + + auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); + while (iter_ExtensionFieldSetsInsideOptional_1.Next()) + { + auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); + jobject newElement_1; + jobject newElement_1_clusterID; + std::string newElement_1_clusterIDClassName = "java/lang/Long"; + std::string newElement_1_clusterIDCtorSignature = "(J)V"; + jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + jninewElement_1_clusterID, newElement_1_clusterID); + jobject newElement_1_attributeValueList; + chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); + + auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); + while (iter_newElement_1_attributeValueList_3.Next()) + { + auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); + jobject newElement_3; + jobject newElement_3_attributeID; + std::string newElement_3_attributeIDClassName = "java/lang/Long"; + std::string newElement_3_attributeIDCtorSignature = "(J)V"; + jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), + newElement_3_attributeIDCtorSignature.c_str(), + jninewElement_3_attributeID, newElement_3_attributeID); + jobject newElement_3_attributeValue; + std::string newElement_3_attributeValueClassName = "java/lang/Long"; + std::string newElement_3_attributeValueCtorSignature = "(J)V"; + jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), + jninewElement_3_attributeValue, newElement_3_attributeValue); + + jclass attributeValuePairStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterAttributeValuePair", + attributeValuePairStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterAttributeValuePair"); + return; + } + + jmethodID attributeValuePairStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, attributeValuePairStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Long;)V", + &attributeValuePairStructCtor_4); + if (err != CHIP_NO_ERROR || attributeValuePairStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterAttributeValuePair constructor"); + return; + } + + newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, + newElement_3_attributeID, newElement_3_attributeValue); + chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); + } + + jclass extensionFieldSetStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterExtensionFieldSet", extensionFieldSetStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterExtensionFieldSet"); + return; + } + + jmethodID extensionFieldSetStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, extensionFieldSetStructClass_2, "", + "(Ljava/lang/Long;Ljava/util/ArrayList;)V", + &extensionFieldSetStructCtor_2); + if (err != CHIP_NO_ERROR || extensionFieldSetStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterExtensionFieldSet constructor"); + return; + } + + newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, + newElement_1_attributeValueList); + chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterRemoveSceneResponseCallback::CHIPScenesManagementClusterRemoveSceneResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3408,8 +3276,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCa } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterRemoveSceneResponseCallback::~CHIPScenesManagementClusterRemoveSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3420,10 +3287,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCa env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & - dataResponse) +void CHIPScenesManagementClusterRemoveSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3433,19 +3298,18 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeRespo VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3454,23 +3318,23 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeRespo jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } -CHIPRvcRunModeClusterChangeToModeResponseCallback::CHIPRvcRunModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterRemoveAllScenesResponseCallback::CHIPScenesManagementClusterRemoveAllScenesResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3486,7 +3350,7 @@ CHIPRvcRunModeClusterChangeToModeResponseCallback::CHIPRvcRunModeClusterChangeTo } } -CHIPRvcRunModeClusterChangeToModeResponseCallback::~CHIPRvcRunModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterRemoveAllScenesResponseCallback::~CHIPScenesManagementClusterRemoveAllScenesResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3497,8 +3361,8 @@ CHIPRvcRunModeClusterChangeToModeResponseCallback::~CHIPRvcRunModeClusterChangeT env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterRemoveAllScenesResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3508,17 +3372,17 @@ void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); @@ -3528,23 +3392,17 @@ void CHIPRvcRunModeClusterChangeToModeResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } -CHIPRvcCleanModeClusterChangeToModeResponseCallback::CHIPRvcCleanModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterStoreSceneResponseCallback::CHIPScenesManagementClusterStoreSceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3560,7 +3418,7 @@ CHIPRvcCleanModeClusterChangeToModeResponseCallback::CHIPRvcCleanModeClusterChan } } -CHIPRvcCleanModeClusterChangeToModeResponseCallback::~CHIPRvcCleanModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterStoreSceneResponseCallback::~CHIPScenesManagementClusterStoreSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3571,8 +3429,8 @@ CHIPRvcCleanModeClusterChangeToModeResponseCallback::~CHIPRvcCleanModeClusterCha env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterStoreSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3582,18 +3440,18 @@ void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3602,23 +3460,23 @@ void CHIPRvcCleanModeClusterChangeToModeResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); - } - else - { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); - } + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } -CHIPDishwasherModeClusterChangeToModeResponseCallback::CHIPDishwasherModeClusterChangeToModeResponseCallback(jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterGetSceneMembershipResponseCallback::CHIPScenesManagementClusterGetSceneMembershipResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3634,7 +3492,7 @@ CHIPDishwasherModeClusterChangeToModeResponseCallback::CHIPDishwasherModeCluster } } -CHIPDishwasherModeClusterChangeToModeResponseCallback::~CHIPDishwasherModeClusterChangeToModeResponseCallback() +CHIPScenesManagementClusterGetSceneMembershipResponseCallback::~CHIPScenesManagementClusterGetSceneMembershipResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3645,8 +3503,8 @@ CHIPDishwasherModeClusterChangeToModeResponseCallback::~CHIPDishwasherModeCluste env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterGetSceneMembershipResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3656,18 +3514,19 @@ void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject Status; @@ -3676,23 +3535,54 @@ void CHIPDishwasherModeClusterChangeToModeResponseCallback::CallbackFn( jint jniStatus = static_cast(dataResponse.status); chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, Status); - jobject StatusText; - if (!dataResponse.statusText.HasValue()) + jobject Capacity; + if (dataResponse.capacity.IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + Capacity = nullptr; } else { - jobject StatusTextInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + std::string CapacityClassName = "java/lang/Integer"; + std::string CapacityCtorSignature = "(I)V"; + jint jniCapacity = static_cast(dataResponse.capacity.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), + jniCapacity, Capacity); + } + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneList; + if (!dataResponse.sceneList.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneList); } + else + { + jobject SceneListInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(SceneListInsideOptional); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); + auto iter_SceneListInsideOptional_1 = dataResponse.sceneList.Value().begin(); + while (iter_SceneListInsideOptional_1.Next()) + { + auto & entry_1 = iter_SceneListInsideOptional_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(SceneListInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(SceneListInsideOptional, SceneList); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupID, SceneList); } -CHIPOperationalStateClusterOperationalCommandResponseCallback::CHIPOperationalStateClusterOperationalCommandResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterEnhancedAddSceneResponseCallback::CHIPScenesManagementClusterEnhancedAddSceneResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3708,7 +3598,7 @@ CHIPOperationalStateClusterOperationalCommandResponseCallback::CHIPOperationalSt } } -CHIPOperationalStateClusterOperationalCommandResponseCallback::~CHIPOperationalStateClusterOperationalCommandResponseCallback() +CHIPScenesManagementClusterEnhancedAddSceneResponseCallback::~CHIPScenesManagementClusterEnhancedAddSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3719,8 +3609,8 @@ CHIPOperationalStateClusterOperationalCommandResponseCallback::~CHIPOperationalS env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterEnhancedAddSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3730,10 +3620,10 @@ void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3741,73 +3631,32 @@ void CHIPOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Lchip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct;)V", - &javaMethod); + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject CommandResponseState; - jobject CommandResponseState_errorStateID; - std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; - std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); - jobject CommandResponseState_errorStateLabel; - if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); - } - else - { - jobject CommandResponseState_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, - CommandResponseState_errorStateLabel); - } - jobject CommandResponseState_errorStateDetails; - if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); - } - else - { - jobject CommandResponseState_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, - CommandResponseState_errorStateDetails); - } - - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); - return; - } - - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); - return; - } - - CommandResponseState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, - CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); - env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } -CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CHIPRvcOperationalStateClusterOperationalCommandResponseCallback( - jobject javaCallback) : - Callback::Callback(CallbackFn, this) +CHIPScenesManagementClusterEnhancedViewSceneResponseCallback::CHIPScenesManagementClusterEnhancedViewSceneResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3823,8 +3672,7 @@ CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CHIPRvcOperati } } -CHIPRvcOperationalStateClusterOperationalCommandResponseCallback:: - ~CHIPRvcOperationalStateClusterOperationalCommandResponseCallback() +CHIPScenesManagementClusterEnhancedViewSceneResponseCallback::~CHIPScenesManagementClusterEnhancedViewSceneResponseCallback() { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3835,9 +3683,8 @@ CHIPRvcOperationalStateClusterOperationalCommandResponseCallback:: env->DeleteGlobalRef(javaCallbackRef); }; -void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackFn( - void * context, - const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & dataResponse) +void CHIPScenesManagementClusterEnhancedViewSceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType & dataResponse) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3847,10 +3694,10 @@ void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackF VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); javaCallbackRef = cppCallback->javaCallbackRef; @@ -3858,69 +3705,230 @@ void CHIPRvcOperationalStateClusterOperationalCommandResponseCallback::CallbackF VerifyOrReturn(javaCallbackRef != nullptr); err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", "(Lchip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct;)V", + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - jobject CommandResponseState; - jobject CommandResponseState_errorStateID; - std::string CommandResponseState_errorStateIDClassName = "java/lang/Integer"; - std::string CommandResponseState_errorStateIDCtorSignature = "(I)V"; - jint jniCommandResponseState_errorStateID = static_cast(dataResponse.commandResponseState.errorStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - CommandResponseState_errorStateIDClassName.c_str(), CommandResponseState_errorStateIDCtorSignature.c_str(), - jniCommandResponseState_errorStateID, CommandResponseState_errorStateID); - jobject CommandResponseState_errorStateLabel; - if (!dataResponse.commandResponseState.errorStateLabel.HasValue()) + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + jint jniGroupID = static_cast(dataResponse.groupID); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), jniGroupID, + GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + jint jniSceneID = static_cast(dataResponse.sceneID); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), jniSceneID, + SceneID); + jobject TransitionTime; + if (!dataResponse.transitionTime.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateLabel); + chip::JniReferences::GetInstance().CreateOptional(nullptr, TransitionTime); } else { - jobject CommandResponseState_errorStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateLabel.Value(), CommandResponseState_errorStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateLabelInsideOptional, - CommandResponseState_errorStateLabel); + jobject TransitionTimeInsideOptional; + std::string TransitionTimeInsideOptionalClassName = "java/lang/Integer"; + std::string TransitionTimeInsideOptionalCtorSignature = "(I)V"; + jint jniTransitionTimeInsideOptional = static_cast(dataResponse.transitionTime.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(TransitionTimeInsideOptionalClassName.c_str(), + TransitionTimeInsideOptionalCtorSignature.c_str(), + jniTransitionTimeInsideOptional, TransitionTimeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(TransitionTimeInsideOptional, TransitionTime); } - jobject CommandResponseState_errorStateDetails; - if (!dataResponse.commandResponseState.errorStateDetails.HasValue()) + jobject SceneName; + if (!dataResponse.sceneName.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, CommandResponseState_errorStateDetails); + chip::JniReferences::GetInstance().CreateOptional(nullptr, SceneName); } else { - jobject CommandResponseState_errorStateDetailsInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - dataResponse.commandResponseState.errorStateDetails.Value(), CommandResponseState_errorStateDetailsInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(CommandResponseState_errorStateDetailsInsideOptional, - CommandResponseState_errorStateDetails); + jobject SceneNameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.sceneName.Value(), SceneNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(SceneNameInsideOptional, SceneName); + } + jobject ExtensionFieldSets; + if (!dataResponse.extensionFieldSets.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, ExtensionFieldSets); } + else + { + jobject ExtensionFieldSetsInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(ExtensionFieldSetsInsideOptional); - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) + auto iter_ExtensionFieldSetsInsideOptional_1 = dataResponse.extensionFieldSets.Value().begin(); + while (iter_ExtensionFieldSetsInsideOptional_1.Next()) + { + auto & entry_1 = iter_ExtensionFieldSetsInsideOptional_1.GetValue(); + jobject newElement_1; + jobject newElement_1_clusterID; + std::string newElement_1_clusterIDClassName = "java/lang/Long"; + std::string newElement_1_clusterIDCtorSignature = "(J)V"; + jlong jninewElement_1_clusterID = static_cast(entry_1.clusterID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + jninewElement_1_clusterID, newElement_1_clusterID); + jobject newElement_1_attributeValueList; + chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); + + auto iter_newElement_1_attributeValueList_3 = entry_1.attributeValueList.begin(); + while (iter_newElement_1_attributeValueList_3.Next()) + { + auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); + jobject newElement_3; + jobject newElement_3_attributeID; + std::string newElement_3_attributeIDClassName = "java/lang/Long"; + std::string newElement_3_attributeIDCtorSignature = "(J)V"; + jlong jninewElement_3_attributeID = static_cast(entry_3.attributeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_attributeIDClassName.c_str(), + newElement_3_attributeIDCtorSignature.c_str(), + jninewElement_3_attributeID, newElement_3_attributeID); + jobject newElement_3_attributeValue; + std::string newElement_3_attributeValueClassName = "java/lang/Long"; + std::string newElement_3_attributeValueCtorSignature = "(J)V"; + jlong jninewElement_3_attributeValue = static_cast(entry_3.attributeValue); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_attributeValueClassName.c_str(), newElement_3_attributeValueCtorSignature.c_str(), + jninewElement_3_attributeValue, newElement_3_attributeValue); + + jclass attributeValuePairStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterAttributeValuePair", + attributeValuePairStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterAttributeValuePair"); + return; + } + + jmethodID attributeValuePairStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, attributeValuePairStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Long;)V", + &attributeValuePairStructCtor_4); + if (err != CHIP_NO_ERROR || attributeValuePairStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterAttributeValuePair constructor"); + return; + } + + newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, + newElement_3_attributeID, newElement_3_attributeValue); + chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); + } + + jclass extensionFieldSetStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterExtensionFieldSet", extensionFieldSetStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterExtensionFieldSet"); + return; + } + + jmethodID extensionFieldSetStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, extensionFieldSetStructClass_2, "", + "(Ljava/lang/Long;Ljava/util/ArrayList;)V", + &extensionFieldSetStructCtor_2); + if (err != CHIP_NO_ERROR || extensionFieldSetStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterExtensionFieldSet constructor"); + return; + } + + newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterID, + newElement_1_attributeValueList); + chip::JniReferences::GetInstance().AddToList(ExtensionFieldSetsInsideOptional, newElement_1); + } + chip::JniReferences::GetInstance().CreateOptional(ExtensionFieldSetsInsideOptional, ExtensionFieldSets); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); +} +CHIPScenesManagementClusterCopySceneResponseCallback::CHIPScenesManagementClusterCopySceneResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); + ChipLogError(Zcl, "Could not create global reference for Java callback"); return; } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesManagementClusterCopySceneResponseCallback::~CHIPScenesManagementClusterCopySceneResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); return; } + env->DeleteGlobalRef(javaCallbackRef); +}; - CommandResponseState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, CommandResponseState_errorStateID, - CommandResponseState_errorStateLabel, CommandResponseState_errorStateDetails); +void CHIPScenesManagementClusterCopySceneResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; - env->CallVoidMethod(javaCallbackRef, javaMethod, CommandResponseState); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject GroupIdentifierFrom; + std::string GroupIdentifierFromClassName = "java/lang/Integer"; + std::string GroupIdentifierFromCtorSignature = "(I)V"; + jint jniGroupIdentifierFrom = static_cast(dataResponse.groupIdentifierFrom); + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdentifierFromClassName.c_str(), + GroupIdentifierFromCtorSignature.c_str(), jniGroupIdentifierFrom, + GroupIdentifierFrom); + jobject SceneIdentifierFrom; + std::string SceneIdentifierFromClassName = "java/lang/Integer"; + std::string SceneIdentifierFromCtorSignature = "(I)V"; + jint jniSceneIdentifierFrom = static_cast(dataResponse.sceneIdentifierFrom); + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdentifierFromClassName.c_str(), + SceneIdentifierFromCtorSignature.c_str(), jniSceneIdentifierFrom, + SceneIdentifierFrom); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupIdentifierFrom, SceneIdentifierFrom); } CHIPEnergyEvseClusterGetTargetsResponseCallback::CHIPEnergyEvseClusterGetTargetsResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 1a0c0dd4d2ef50..d112362f4e87f2 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -78,131 +78,6 @@ class CHIPGroupsClusterRemoveGroupResponseCallback : public Callback::Callback -{ -public: - CHIPScenesClusterAddSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterAddSceneResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterViewSceneResponseCallback : public Callback::Callback -{ -public: - CHIPScenesClusterViewSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterViewSceneResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterRemoveSceneResponseCallback : public Callback::Callback -{ -public: - CHIPScenesClusterRemoveSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterRemoveSceneResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterRemoveAllScenesResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesClusterRemoveAllScenesResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterRemoveAllScenesResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterStoreSceneResponseCallback : public Callback::Callback -{ -public: - CHIPScenesClusterStoreSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterStoreSceneResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterGetSceneMembershipResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesClusterGetSceneMembershipResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterGetSceneMembershipResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterEnhancedAddSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesClusterEnhancedAddSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterEnhancedAddSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterEnhancedViewSceneResponseCallback - : public Callback::Callback -{ -public: - CHIPScenesClusterEnhancedViewSceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterEnhancedViewSceneResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - -class CHIPScenesClusterCopySceneResponseCallback : public Callback::Callback -{ -public: - CHIPScenesClusterCopySceneResponseCallback(jobject javaCallback); - - ~CHIPScenesClusterCopySceneResponseCallback(); - - static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback : public Callback::Callback { @@ -648,6 +523,141 @@ class CHIPRvcOperationalStateClusterOperationalCommandResponseCallback jobject javaCallbackRef; }; +class CHIPScenesManagementClusterAddSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterAddSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterAddSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterViewSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterViewSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterViewSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterRemoveSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterRemoveSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterRemoveSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterRemoveAllScenesResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterRemoveAllScenesResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterRemoveAllScenesResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterStoreSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterStoreSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterStoreSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterGetSceneMembershipResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterGetSceneMembershipResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterGetSceneMembershipResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterEnhancedAddSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterEnhancedAddSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterEnhancedAddSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterEnhancedViewSceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterEnhancedViewSceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterEnhancedViewSceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPScenesManagementClusterCopySceneResponseCallback + : public Callback::Callback +{ +public: + CHIPScenesManagementClusterCopySceneResponseCallback(jobject javaCallback); + + ~CHIPScenesManagementClusterCopySceneResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPEnergyEvseClusterGetTargetsResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 6db0e9cb9b9056..7dc74f00c951c0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -591,8 +591,8 @@ void CHIPGroupsAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesLastConfiguredByAttributeCallback::CHIPScenesLastConfiguredByAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -608,7 +608,7 @@ CHIPScenesLastConfiguredByAttributeCallback::CHIPScenesLastConfiguredByAttribute } } -CHIPScenesLastConfiguredByAttributeCallback::~CHIPScenesLastConfiguredByAttributeCallback() +CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -619,8 +619,8 @@ CHIPScenesLastConfiguredByAttributeCallback::~CHIPScenesLastConfiguredByAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -628,8 +628,8 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -637,7 +637,7 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -647,18 +647,19 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPScenesFabricSceneInfoAttributeCallback::CHIPScenesFabricSceneInfoAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffGeneratedCommandListAttributeCallback::CHIPOnOffGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -674,7 +675,7 @@ CHIPScenesFabricSceneInfoAttributeCallback::CHIPScenesFabricSceneInfoAttributeCa } } -CHIPScenesFabricSceneInfoAttributeCallback::~CHIPScenesFabricSceneInfoAttributeCallback() +CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -685,9 +686,8 @@ CHIPScenesFabricSceneInfoAttributeCallback::~CHIPScenesFabricSceneInfoAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -696,8 +696,8 @@ void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -716,72 +716,11 @@ void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_sceneCount; - std::string newElement_0_sceneCountClassName = "java/lang/Integer"; - std::string newElement_0_sceneCountCtorSignature = "(I)V"; - jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), - newElement_0_sceneCountCtorSignature.c_str(), - jninewElement_0_sceneCount, newElement_0_sceneCount); - jobject newElement_0_currentScene; - std::string newElement_0_currentSceneClassName = "java/lang/Integer"; - std::string newElement_0_currentSceneCtorSignature = "(I)V"; - jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), - newElement_0_currentSceneCtorSignature.c_str(), - jninewElement_0_currentScene, newElement_0_currentScene); - jobject newElement_0_currentGroup; - std::string newElement_0_currentGroupClassName = "java/lang/Integer"; - std::string newElement_0_currentGroupCtorSignature = "(I)V"; - jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), - newElement_0_currentGroupCtorSignature.c_str(), - jninewElement_0_currentGroup, newElement_0_currentGroup); - jobject newElement_0_sceneValid; - std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; - std::string newElement_0_sceneValidCtorSignature = "(Z)V"; - jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), - newElement_0_sceneValidCtorSignature.c_str(), - jninewElement_0_sceneValid, newElement_0_sceneValid); - jobject newElement_0_remainingCapacity; - std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; - std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; - jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), - jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass sceneInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", - sceneInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); - return; - } - - jmethodID sceneInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, sceneInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &sceneInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, - newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, - newElement_0_remainingCapacity, newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -789,9 +728,8 @@ void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -807,7 +745,7 @@ CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListA } } -CHIPScenesGeneratedCommandListAttributeCallback::~CHIPScenesGeneratedCommandListAttributeCallback() +CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -818,8 +756,8 @@ CHIPScenesGeneratedCommandListAttributeCallback::~CHIPScenesGeneratedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -828,8 +766,8 @@ void CHIPScenesGeneratedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -860,9 +798,8 @@ void CHIPScenesGeneratedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesAcceptedCommandListAttributeCallback::CHIPScenesAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffEventListAttributeCallback::CHIPOnOffEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -878,7 +815,7 @@ CHIPScenesAcceptedCommandListAttributeCallback::CHIPScenesAcceptedCommandListAtt } } -CHIPScenesAcceptedCommandListAttributeCallback::~CHIPScenesAcceptedCommandListAttributeCallback() +CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -889,8 +826,8 @@ CHIPScenesAcceptedCommandListAttributeCallback::~CHIPScenesAcceptedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -899,8 +836,8 @@ void CHIPScenesAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -931,8 +868,8 @@ void CHIPScenesAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesEventListAttributeCallback::CHIPScenesEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -948,7 +885,7 @@ CHIPScenesEventListAttributeCallback::CHIPScenesEventListAttributeCallback(jobje } } -CHIPScenesEventListAttributeCallback::~CHIPScenesEventListAttributeCallback() +CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -959,8 +896,8 @@ CHIPScenesEventListAttributeCallback::~CHIPScenesEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -969,8 +906,8 @@ void CHIPScenesEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1001,8 +938,10 @@ void CHIPScenesEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesAttributeListAttributeCallback::CHIPScenesAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: + CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1018,7 +957,8 @@ CHIPScenesAttributeListAttributeCallback::CHIPScenesAttributeListAttributeCallba } } -CHIPScenesAttributeListAttributeCallback::~CHIPScenesAttributeListAttributeCallback() +CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: + ~CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1029,8 +969,8 @@ CHIPScenesAttributeListAttributeCallback::~CHIPScenesAttributeListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1039,8 +979,8 @@ void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1071,8 +1011,10 @@ void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1088,7 +1030,8 @@ CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(j } } -CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback() +CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: + ~CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1099,8 +1042,8 @@ CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1108,8 +1051,9 @@ void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1117,29 +1061,33 @@ void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOnOffGeneratedCommandListAttributeCallback::CHIPOnOffGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffSwitchConfigurationEventListAttributeCallback::CHIPOnOffSwitchConfigurationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1155,7 +1103,7 @@ CHIPOnOffGeneratedCommandListAttributeCallback::CHIPOnOffGeneratedCommandListAtt } } -CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAttributeCallback() +CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1166,8 +1114,8 @@ CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1176,8 +1124,8 @@ void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1208,8 +1156,10 @@ void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1225,7 +1175,7 @@ CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttri } } -CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttributeCallback() +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1236,8 +1186,8 @@ CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1246,8 +1196,8 @@ void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1278,8 +1228,8 @@ void CHIPOnOffAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOnOffEventListAttributeCallback::CHIPOnOffEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlCurrentLevelAttributeCallback::CHIPLevelControlCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1295,7 +1245,7 @@ CHIPOnOffEventListAttributeCallback::CHIPOnOffEventListAttributeCallback(jobject } } -CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() +CHIPLevelControlCurrentLevelAttributeCallback::~CHIPLevelControlCurrentLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1306,8 +1256,8 @@ CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1315,9 +1265,8 @@ void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1325,31 +1274,28 @@ void CHIPOnOffEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1365,7 +1311,7 @@ CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback } } -CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() +CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1376,8 +1322,7 @@ CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1385,9 +1330,8 @@ void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1395,33 +1339,29 @@ void CHIPOnOffAttributeListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1437,8 +1377,7 @@ CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: } } -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback() +CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1449,8 +1388,8 @@ CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1458,9 +1397,8 @@ void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1468,33 +1406,29 @@ void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1510,8 +1444,7 @@ CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CHIPOnOffSwitc } } -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback() +CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1522,8 +1455,8 @@ CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1531,9 +1464,8 @@ void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1541,33 +1473,29 @@ void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOnOffSwitchConfigurationEventListAttributeCallback::CHIPOnOffSwitchConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1583,7 +1511,7 @@ CHIPOnOffSwitchConfigurationEventListAttributeCallback::CHIPOnOffSwitchConfigura } } -CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigurationEventListAttributeCallback() +CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1594,8 +1522,8 @@ CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigur env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1603,9 +1531,8 @@ void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1613,32 +1540,29 @@ void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -1655,7 +1579,7 @@ CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfi } } -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() +CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCurrentLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1666,8 +1590,8 @@ CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConf env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1675,9 +1599,8 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1685,31 +1608,30 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLevelControlCurrentLevelAttributeCallback::CHIPLevelControlCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlGeneratedCommandListAttributeCallback::CHIPLevelControlGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1725,7 +1647,7 @@ CHIPLevelControlCurrentLevelAttributeCallback::CHIPLevelControlCurrentLevelAttri } } -CHIPLevelControlCurrentLevelAttributeCallback::~CHIPLevelControlCurrentLevelAttributeCallback() +CHIPLevelControlGeneratedCommandListAttributeCallback::~CHIPLevelControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1736,8 +1658,8 @@ CHIPLevelControlCurrentLevelAttributeCallback::~CHIPLevelControlCurrentLevelAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1745,8 +1667,9 @@ void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1754,28 +1677,33 @@ void CHIPLevelControlCurrentLevelAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlAcceptedCommandListAttributeCallback::CHIPLevelControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1791,7 +1719,7 @@ CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallba } } -CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallback() +CHIPLevelControlAcceptedCommandListAttributeCallback::~CHIPLevelControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1802,7 +1730,8 @@ CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1810,8 +1739,9 @@ void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1819,29 +1749,31 @@ void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlEventListAttributeCallback::CHIPLevelControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1857,7 +1789,7 @@ CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionT } } -CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() +CHIPLevelControlEventListAttributeCallback::~CHIPLevelControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1868,8 +1800,8 @@ CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransition env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1877,8 +1809,9 @@ void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1886,29 +1819,32 @@ void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1924,7 +1860,7 @@ CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitio } } -CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() +CHIPLevelControlAttributeListAttributeCallback::~CHIPLevelControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1935,8 +1871,8 @@ CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransiti env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1944,8 +1880,9 @@ void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -1953,29 +1890,33 @@ void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CHIPBinaryInputBasicGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1991,7 +1932,7 @@ CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRat } } -CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRateAttributeCallback() +CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::~CHIPBinaryInputBasicGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2002,8 +1943,8 @@ CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2011,8 +1952,9 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2020,29 +1962,32 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CHIPBinaryInputBasicAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2059,7 +2004,7 @@ CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCur } } -CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCurrentLevelAttributeCallback() +CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::~CHIPBinaryInputBasicAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2070,8 +2015,8 @@ CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2079,8 +2024,9 @@ void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2088,31 +2034,33 @@ void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlGeneratedCommandListAttributeCallback::CHIPLevelControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ +CHIPBinaryInputBasicEventListAttributeCallback::CHIPBinaryInputBasicEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) { @@ -2127,7 +2075,7 @@ CHIPLevelControlGeneratedCommandListAttributeCallback::CHIPLevelControlGenerated } } -CHIPLevelControlGeneratedCommandListAttributeCallback::~CHIPLevelControlGeneratedCommandListAttributeCallback() +CHIPBinaryInputBasicEventListAttributeCallback::~CHIPBinaryInputBasicEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2138,8 +2086,8 @@ CHIPLevelControlGeneratedCommandListAttributeCallback::~CHIPLevelControlGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2148,8 +2096,8 @@ void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2180,10 +2128,9 @@ void CHIPLevelControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlAcceptedCommandListAttributeCallback::CHIPLevelControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPBinaryInputBasicAttributeListAttributeCallback::CHIPBinaryInputBasicAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2199,7 +2146,7 @@ CHIPLevelControlAcceptedCommandListAttributeCallback::CHIPLevelControlAcceptedCo } } -CHIPLevelControlAcceptedCommandListAttributeCallback::~CHIPLevelControlAcceptedCommandListAttributeCallback() +CHIPBinaryInputBasicAttributeListAttributeCallback::~CHIPBinaryInputBasicAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2210,8 +2157,8 @@ CHIPLevelControlAcceptedCommandListAttributeCallback::~CHIPLevelControlAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2220,8 +2167,8 @@ void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2252,8 +2199,10 @@ void CHIPLevelControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlEventListAttributeCallback::CHIPLevelControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CHIPPulseWidthModulationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2269,7 +2218,7 @@ CHIPLevelControlEventListAttributeCallback::CHIPLevelControlEventListAttributeCa } } -CHIPLevelControlEventListAttributeCallback::~CHIPLevelControlEventListAttributeCallback() +CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::~CHIPPulseWidthModulationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2280,8 +2229,8 @@ CHIPLevelControlEventListAttributeCallback::~CHIPLevelControlEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2290,8 +2239,8 @@ void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2322,9 +2271,10 @@ void CHIPLevelControlEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CHIPPulseWidthModulationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2340,7 +2290,7 @@ CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAtt } } -CHIPLevelControlAttributeListAttributeCallback::~CHIPLevelControlAttributeListAttributeCallback() +CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::~CHIPPulseWidthModulationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2351,8 +2301,8 @@ CHIPLevelControlAttributeListAttributeCallback::~CHIPLevelControlAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2361,8 +2311,8 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2393,10 +2343,9 @@ void CHIPLevelControlAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CHIPBinaryInputBasicGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPulseWidthModulationEventListAttributeCallback::CHIPPulseWidthModulationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2412,7 +2361,7 @@ CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CHIPBinaryInputBasicG } } -CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::~CHIPBinaryInputBasicGeneratedCommandListAttributeCallback() +CHIPPulseWidthModulationEventListAttributeCallback::~CHIPPulseWidthModulationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2423,8 +2372,8 @@ CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::~CHIPBinaryInputBasic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2433,8 +2382,8 @@ void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2465,9 +2414,9 @@ void CHIPBinaryInputBasicGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CHIPBinaryInputBasicAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPulseWidthModulationAttributeListAttributeCallback::CHIPPulseWidthModulationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -2484,7 +2433,7 @@ CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CHIPBinaryInputBasicAc } } -CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::~CHIPBinaryInputBasicAcceptedCommandListAttributeCallback() +CHIPPulseWidthModulationAttributeListAttributeCallback::~CHIPPulseWidthModulationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2495,8 +2444,8 @@ CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::~CHIPBinaryInputBasicA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPulseWidthModulationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2505,8 +2454,8 @@ void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2537,9 +2486,8 @@ void CHIPBinaryInputBasicAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBinaryInputBasicEventListAttributeCallback::CHIPBinaryInputBasicEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorDeviceTypeListAttributeCallback::CHIPDescriptorDeviceTypeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2555,7 +2503,7 @@ CHIPBinaryInputBasicEventListAttributeCallback::CHIPBinaryInputBasicEventListAtt } } -CHIPBinaryInputBasicEventListAttributeCallback::~CHIPBinaryInputBasicEventListAttributeCallback() +CHIPDescriptorDeviceTypeListAttributeCallback::~CHIPDescriptorDeviceTypeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2566,8 +2514,9 @@ CHIPBinaryInputBasicEventListAttributeCallback::~CHIPBinaryInputBasicEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2576,8 +2525,8 @@ void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2596,11 +2545,41 @@ void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_deviceType; + std::string newElement_0_deviceTypeClassName = "java/lang/Long"; + std::string newElement_0_deviceTypeCtorSignature = "(J)V"; + jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), + newElement_0_deviceTypeCtorSignature.c_str(), + jninewElement_0_deviceType, newElement_0_deviceType); + jobject newElement_0_revision; + std::string newElement_0_revisionClassName = "java/lang/Integer"; + std::string newElement_0_revisionCtorSignature = "(I)V"; + jint jninewElement_0_revision = static_cast(entry_0.revision); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), + newElement_0_revisionCtorSignature.c_str(), + jninewElement_0_revision, newElement_0_revision); + + jclass deviceTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); + return; + } + + jmethodID deviceTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, deviceTypeStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V", &deviceTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); + return; + } + + newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, + newElement_0_revision); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2608,9 +2587,8 @@ void CHIPBinaryInputBasicEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBinaryInputBasicAttributeListAttributeCallback::CHIPBinaryInputBasicAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2626,7 +2604,7 @@ CHIPBinaryInputBasicAttributeListAttributeCallback::CHIPBinaryInputBasicAttribut } } -CHIPBinaryInputBasicAttributeListAttributeCallback::~CHIPBinaryInputBasicAttributeListAttributeCallback() +CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2637,8 +2615,8 @@ CHIPBinaryInputBasicAttributeListAttributeCallback::~CHIPBinaryInputBasicAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2647,8 +2625,8 @@ void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2679,10 +2657,8 @@ void CHIPBinaryInputBasicAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CHIPPulseWidthModulationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2698,7 +2674,7 @@ CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CHIPPulseWidthMod } } -CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::~CHIPPulseWidthModulationGeneratedCommandListAttributeCallback() +CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2709,8 +2685,8 @@ CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::~CHIPPulseWidthMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2719,8 +2695,8 @@ void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2751,10 +2727,8 @@ void CHIPPulseWidthModulationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CHIPPulseWidthModulationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2770,7 +2744,7 @@ CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CHIPPulseWidthModu } } -CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::~CHIPPulseWidthModulationAcceptedCommandListAttributeCallback() +CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2781,8 +2755,8 @@ CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::~CHIPPulseWidthMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2791,8 +2765,8 @@ void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2811,11 +2785,11 @@ void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2823,9 +2797,8 @@ void CHIPPulseWidthModulationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPulseWidthModulationEventListAttributeCallback::CHIPPulseWidthModulationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorTagListAttributeCallback::CHIPDescriptorTagListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2841,7 +2814,7 @@ CHIPPulseWidthModulationEventListAttributeCallback::CHIPPulseWidthModulationEven } } -CHIPPulseWidthModulationEventListAttributeCallback::~CHIPPulseWidthModulationEventListAttributeCallback() +CHIPDescriptorTagListAttributeCallback::~CHIPDescriptorTagListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2852,8 +2825,9 @@ CHIPPulseWidthModulationEventListAttributeCallback::~CHIPPulseWidthModulationEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorTagListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -2862,8 +2836,8 @@ void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -2882,83 +2856,74 @@ void CHIPPulseWidthModulationEventListAttributeCallback::CallbackFn(void * conte { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPulseWidthModulationAttributeListAttributeCallback::CHIPPulseWidthModulationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPulseWidthModulationAttributeListAttributeCallback::~CHIPPulseWidthModulationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPulseWidthModulationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + jobject newElement_0_mfgCode; + if (entry_0.mfgCode.IsNull()) + { + newElement_0_mfgCode = nullptr; + } + else + { + std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_0_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), + newElement_0_mfgCodeCtorSignature.c_str(), + jninewElement_0_mfgCode, newElement_0_mfgCode); + } + jobject newElement_0_namespaceID; + std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; + std::string newElement_0_namespaceIDCtorSignature = "(I)V"; + jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), + newElement_0_namespaceIDCtorSignature.c_str(), + jninewElement_0_namespaceID, newElement_0_namespaceID); + jobject newElement_0_tag; + std::string newElement_0_tagClassName = "java/lang/Integer"; + std::string newElement_0_tagCtorSignature = "(I)V"; + jint jninewElement_0_tag = static_cast(entry_0.tag); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), jninewElement_0_tag, newElement_0_tag); + jobject newElement_0_label; + if (!entry_0.label.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); + } + else + { + jobject newElement_0_labelInsideOptional; + if (entry_0.label.Value().IsNull()) + { + newElement_0_labelInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value().Value(), + newElement_0_labelInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); + } - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass semanticTagStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); + return; + } - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jmethodID semanticTagStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, semanticTagStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", &semanticTagStructStructCtor_1); + if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); + return; + } - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, + newElement_0_namespaceID, newElement_0_tag, newElement_0_label); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -2966,8 +2931,9 @@ void CHIPPulseWidthModulationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorDeviceTypeListAttributeCallback::CHIPDescriptorDeviceTypeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorGeneratedCommandListAttributeCallback::CHIPDescriptorGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2983,7 +2949,7 @@ CHIPDescriptorDeviceTypeListAttributeCallback::CHIPDescriptorDeviceTypeListAttri } } -CHIPDescriptorDeviceTypeListAttributeCallback::~CHIPDescriptorDeviceTypeListAttributeCallback() +CHIPDescriptorGeneratedCommandListAttributeCallback::~CHIPDescriptorGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -2994,9 +2960,8 @@ CHIPDescriptorDeviceTypeListAttributeCallback::~CHIPDescriptorDeviceTypeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3005,8 +2970,8 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3025,41 +2990,11 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_deviceType; - std::string newElement_0_deviceTypeClassName = "java/lang/Long"; - std::string newElement_0_deviceTypeCtorSignature = "(J)V"; - jlong jninewElement_0_deviceType = static_cast(entry_0.deviceType); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_deviceTypeClassName.c_str(), - newElement_0_deviceTypeCtorSignature.c_str(), - jninewElement_0_deviceType, newElement_0_deviceType); - jobject newElement_0_revision; - std::string newElement_0_revisionClassName = "java/lang/Integer"; - std::string newElement_0_revisionCtorSignature = "(I)V"; - jint jninewElement_0_revision = static_cast(entry_0.revision); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_revisionClassName.c_str(), - newElement_0_revisionCtorSignature.c_str(), - jninewElement_0_revision, newElement_0_revision); - - jclass deviceTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); - return; - } - - jmethodID deviceTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, deviceTypeStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/Integer;)V", &deviceTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); - return; - } - - newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, - newElement_0_revision); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3067,8 +3002,9 @@ void CHIPDescriptorDeviceTypeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorAcceptedCommandListAttributeCallback::CHIPDescriptorAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3084,7 +3020,7 @@ CHIPDescriptorServerListAttributeCallback::CHIPDescriptorServerListAttributeCall } } -CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCallback() +CHIPDescriptorAcceptedCommandListAttributeCallback::~CHIPDescriptorAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3095,8 +3031,8 @@ CHIPDescriptorServerListAttributeCallback::~CHIPDescriptorServerListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3105,8 +3041,8 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3137,8 +3073,8 @@ void CHIPDescriptorServerListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorEventListAttributeCallback::CHIPDescriptorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3154,7 +3090,7 @@ CHIPDescriptorClientListAttributeCallback::CHIPDescriptorClientListAttributeCall } } -CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCallback() +CHIPDescriptorEventListAttributeCallback::~CHIPDescriptorEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3165,8 +3101,8 @@ CHIPDescriptorClientListAttributeCallback::~CHIPDescriptorClientListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3175,8 +3111,8 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3207,8 +3143,8 @@ void CHIPDescriptorClientListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDescriptorAttributeListAttributeCallback::CHIPDescriptorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3224,7 +3160,7 @@ CHIPDescriptorPartsListAttributeCallback::CHIPDescriptorPartsListAttributeCallba } } -CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallback() +CHIPDescriptorAttributeListAttributeCallback::~CHIPDescriptorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3235,8 +3171,8 @@ CHIPDescriptorPartsListAttributeCallback::~CHIPDescriptorPartsListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3245,8 +3181,8 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3265,11 +3201,11 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3277,8 +3213,8 @@ void CHIPDescriptorPartsListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorTagListAttributeCallback::CHIPDescriptorTagListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingBindingAttributeCallback::CHIPBindingBindingAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3294,7 +3230,7 @@ CHIPDescriptorTagListAttributeCallback::CHIPDescriptorTagListAttributeCallback(j } } -CHIPDescriptorTagListAttributeCallback::~CHIPDescriptorTagListAttributeCallback() +CHIPBindingBindingAttributeCallback::~CHIPBindingBindingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3305,9 +3241,9 @@ CHIPDescriptorTagListAttributeCallback::~CHIPDescriptorTagListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorTagListAttributeCallback::CallbackFn( +void CHIPBindingBindingAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3316,8 +3252,8 @@ void CHIPDescriptorTagListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3336,74 +3272,100 @@ void CHIPDescriptorTagListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_mfgCode; - if (entry_0.mfgCode.IsNull()) + jobject newElement_0_node; + if (!entry_0.node.HasValue()) { - newElement_0_mfgCode = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_node); } else { - std::string newElement_0_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_0_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_0_mfgCode = static_cast(entry_0.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mfgCodeClassName.c_str(), - newElement_0_mfgCodeCtorSignature.c_str(), - jninewElement_0_mfgCode, newElement_0_mfgCode); + jobject newElement_0_nodeInsideOptional; + std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), + jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); } - jobject newElement_0_namespaceID; - std::string newElement_0_namespaceIDClassName = "java/lang/Integer"; - std::string newElement_0_namespaceIDCtorSignature = "(I)V"; - jint jninewElement_0_namespaceID = static_cast(entry_0.namespaceID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_namespaceIDClassName.c_str(), - newElement_0_namespaceIDCtorSignature.c_str(), - jninewElement_0_namespaceID, newElement_0_namespaceID); - jobject newElement_0_tag; - std::string newElement_0_tagClassName = "java/lang/Integer"; - std::string newElement_0_tagCtorSignature = "(I)V"; - jint jninewElement_0_tag = static_cast(entry_0.tag); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_tagClassName.c_str(), newElement_0_tagCtorSignature.c_str(), jninewElement_0_tag, newElement_0_tag); - jobject newElement_0_label; - if (!entry_0.label.HasValue()) + jobject newElement_0_group; + if (!entry_0.group.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_label); + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_group); } else { - jobject newElement_0_labelInsideOptional; - if (entry_0.label.Value().IsNull()) - { - newElement_0_labelInsideOptional = nullptr; - } - else - { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label.Value().Value(), - newElement_0_labelInsideOptional)); - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); + jobject newElement_0_groupInsideOptional; + std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), + jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); + } + jobject newElement_0_endpoint; + if (!entry_0.endpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endpoint); + } + else + { + jobject newElement_0_endpointInsideOptional; + std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_endpointInsideOptionalClassName.c_str(), newElement_0_endpointInsideOptionalCtorSignature.c_str(), + jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); + } + jobject newElement_0_cluster; + if (!entry_0.cluster.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_cluster); + } + else + { + jobject newElement_0_clusterInsideOptional; + std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_clusterInsideOptionalClassName.c_str(), newElement_0_clusterInsideOptionalCtorSignature.c_str(), + jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); } + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass semanticTagStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); + jclass targetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", + targetStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); return; } - jmethodID semanticTagStructStructCtor_1; + jmethodID targetStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( - env, semanticTagStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", &semanticTagStructStructCtor_1); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) + env, targetStructStructClass_1, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", + &targetStructStructCtor_1); + if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); return; } - newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, - newElement_0_namespaceID, newElement_0_tag, newElement_0_label); + newElement_0 = env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, + newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3411,9 +3373,9 @@ void CHIPDescriptorTagListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorGeneratedCommandListAttributeCallback::CHIPDescriptorGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingGeneratedCommandListAttributeCallback::CHIPBindingGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3429,7 +3391,7 @@ CHIPDescriptorGeneratedCommandListAttributeCallback::CHIPDescriptorGeneratedComm } } -CHIPDescriptorGeneratedCommandListAttributeCallback::~CHIPDescriptorGeneratedCommandListAttributeCallback() +CHIPBindingGeneratedCommandListAttributeCallback::~CHIPBindingGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3440,8 +3402,8 @@ CHIPDescriptorGeneratedCommandListAttributeCallback::~CHIPDescriptorGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3450,8 +3412,8 @@ void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3482,9 +3444,9 @@ void CHIPDescriptorGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorAcceptedCommandListAttributeCallback::CHIPDescriptorAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingAcceptedCommandListAttributeCallback::CHIPBindingAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3500,7 +3462,7 @@ CHIPDescriptorAcceptedCommandListAttributeCallback::CHIPDescriptorAcceptedComman } } -CHIPDescriptorAcceptedCommandListAttributeCallback::~CHIPDescriptorAcceptedCommandListAttributeCallback() +CHIPBindingAcceptedCommandListAttributeCallback::~CHIPBindingAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3511,8 +3473,8 @@ CHIPDescriptorAcceptedCommandListAttributeCallback::~CHIPDescriptorAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3521,8 +3483,8 @@ void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3553,8 +3515,8 @@ void CHIPDescriptorAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorEventListAttributeCallback::CHIPDescriptorEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingEventListAttributeCallback::CHIPBindingEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3570,7 +3532,7 @@ CHIPDescriptorEventListAttributeCallback::CHIPDescriptorEventListAttributeCallba } } -CHIPDescriptorEventListAttributeCallback::~CHIPDescriptorEventListAttributeCallback() +CHIPBindingEventListAttributeCallback::~CHIPBindingEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3581,8 +3543,8 @@ CHIPDescriptorEventListAttributeCallback::~CHIPDescriptorEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3591,8 +3553,8 @@ void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3623,8 +3585,8 @@ void CHIPDescriptorEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDescriptorAttributeListAttributeCallback::CHIPDescriptorAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBindingAttributeListAttributeCallback::CHIPBindingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3640,7 +3602,7 @@ CHIPDescriptorAttributeListAttributeCallback::CHIPDescriptorAttributeListAttribu } } -CHIPDescriptorAttributeListAttributeCallback::~CHIPDescriptorAttributeListAttributeCallback() +CHIPBindingAttributeListAttributeCallback::~CHIPBindingAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3651,8 +3613,8 @@ CHIPDescriptorAttributeListAttributeCallback::~CHIPDescriptorAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3661,8 +3623,8 @@ void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3693,8 +3655,8 @@ void CHIPDescriptorAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingBindingAttributeCallback::CHIPBindingBindingAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlAclAttributeCallback::CHIPAccessControlAclAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3710,7 +3672,7 @@ CHIPBindingBindingAttributeCallback::CHIPBindingBindingAttributeCallback(jobject } } -CHIPBindingBindingAttributeCallback::~CHIPBindingBindingAttributeCallback() +CHIPAccessControlAclAttributeCallback::~CHIPAccessControlAclAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3721,9 +3683,10 @@ CHIPBindingBindingAttributeCallback::~CHIPBindingBindingAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBindingBindingAttributeCallback::CallbackFn( +void CHIPAccessControlAclAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3732,8 +3695,8 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3752,69 +3715,123 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_node; - if (!entry_0.node.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_node); - } - else - { - jobject newElement_0_nodeInsideOptional; - std::string newElement_0_nodeInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_nodeInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_nodeInsideOptional = static_cast(entry_0.node.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeInsideOptionalClassName.c_str(), newElement_0_nodeInsideOptionalCtorSignature.c_str(), - jninewElement_0_nodeInsideOptional, newElement_0_nodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nodeInsideOptional, newElement_0_node); - } - jobject newElement_0_group; - if (!entry_0.group.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_group); - } - else - { - jobject newElement_0_groupInsideOptional; - std::string newElement_0_groupInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_groupInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_groupInsideOptional = static_cast(entry_0.group.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_groupInsideOptionalClassName.c_str(), newElement_0_groupInsideOptionalCtorSignature.c_str(), - jninewElement_0_groupInsideOptional, newElement_0_groupInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupInsideOptional, newElement_0_group); - } - jobject newElement_0_endpoint; - if (!entry_0.endpoint.HasValue()) + jobject newElement_0_privilege; + std::string newElement_0_privilegeClassName = "java/lang/Integer"; + std::string newElement_0_privilegeCtorSignature = "(I)V"; + jint jninewElement_0_privilege = static_cast(entry_0.privilege); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), + newElement_0_privilegeCtorSignature.c_str(), + jninewElement_0_privilege, newElement_0_privilege); + jobject newElement_0_authMode; + std::string newElement_0_authModeClassName = "java/lang/Integer"; + std::string newElement_0_authModeCtorSignature = "(I)V"; + jint jninewElement_0_authMode = static_cast(entry_0.authMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), + newElement_0_authModeCtorSignature.c_str(), + jninewElement_0_authMode, newElement_0_authMode); + jobject newElement_0_subjects; + if (entry_0.subjects.IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_endpoint); + newElement_0_subjects = nullptr; } else { - jobject newElement_0_endpointInsideOptional; - std::string newElement_0_endpointInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_0_endpointInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_0_endpointInsideOptional = static_cast(entry_0.endpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_endpointInsideOptionalClassName.c_str(), newElement_0_endpointInsideOptionalCtorSignature.c_str(), - jninewElement_0_endpointInsideOptional, newElement_0_endpointInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_endpointInsideOptional, newElement_0_endpoint); + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_subjects); + + auto iter_newElement_0_subjects_3 = entry_0.subjects.Value().begin(); + while (iter_newElement_0_subjects_3.Next()) + { + auto & entry_3 = iter_newElement_0_subjects_3.GetValue(); + jobject newElement_3; + std::string newElement_3ClassName = "java/lang/Long"; + std::string newElement_3CtorSignature = "(J)V"; + jlong jninewElement_3 = static_cast(entry_3); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); + chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); + } } - jobject newElement_0_cluster; - if (!entry_0.cluster.HasValue()) + jobject newElement_0_targets; + if (entry_0.targets.IsNull()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_cluster); + newElement_0_targets = nullptr; } else { - jobject newElement_0_clusterInsideOptional; - std::string newElement_0_clusterInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_clusterInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_clusterInsideOptional = static_cast(entry_0.cluster.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_clusterInsideOptionalClassName.c_str(), newElement_0_clusterInsideOptionalCtorSignature.c_str(), - jninewElement_0_clusterInsideOptional, newElement_0_clusterInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_clusterInsideOptional, newElement_0_cluster); + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); + + auto iter_newElement_0_targets_3 = entry_0.targets.Value().begin(); + while (iter_newElement_0_targets_3.Next()) + { + auto & entry_3 = iter_newElement_0_targets_3.GetValue(); + jobject newElement_3; + jobject newElement_3_cluster; + if (entry_3.cluster.IsNull()) + { + newElement_3_cluster = nullptr; + } + else + { + std::string newElement_3_clusterClassName = "java/lang/Long"; + std::string newElement_3_clusterCtorSignature = "(J)V"; + jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_clusterClassName.c_str(), + newElement_3_clusterCtorSignature.c_str(), + jninewElement_3_cluster, newElement_3_cluster); + } + jobject newElement_3_endpoint; + if (entry_3.endpoint.IsNull()) + { + newElement_3_endpoint = nullptr; + } + else + { + std::string newElement_3_endpointClassName = "java/lang/Integer"; + std::string newElement_3_endpointCtorSignature = "(I)V"; + jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_endpointClassName.c_str(), + newElement_3_endpointCtorSignature.c_str(), + jninewElement_3_endpoint, newElement_3_endpoint); + } + jobject newElement_3_deviceType; + if (entry_3.deviceType.IsNull()) + { + newElement_3_deviceType = nullptr; + } + else + { + std::string newElement_3_deviceTypeClassName = "java/lang/Long"; + std::string newElement_3_deviceTypeCtorSignature = "(J)V"; + jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), + jninewElement_3_deviceType, newElement_3_deviceType); + } + + jclass accessControlTargetStructStructClass_4; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", + accessControlTargetStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); + return; + } + + jmethodID accessControlTargetStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, accessControlTargetStructStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", + &accessControlTargetStructStructCtor_4); + if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); + return; + } + + newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, + newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); + chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); + } } jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; @@ -3824,28 +3841,30 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass targetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", - targetStructStructClass_1); + jclass accessControlEntryStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); return; } - jmethodID targetStructStructCtor_1; + jmethodID accessControlEntryStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( - env, targetStructStructClass_1, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", - &targetStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) + env, accessControlEntryStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &accessControlEntryStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); return; } - newElement_0 = env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, - newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, newElement_0_privilege, + newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3853,9 +3872,8 @@ void CHIPBindingBindingAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingGeneratedCommandListAttributeCallback::CHIPBindingGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlExtensionAttributeCallback::CHIPAccessControlExtensionAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3871,7 +3889,7 @@ CHIPBindingGeneratedCommandListAttributeCallback::CHIPBindingGeneratedCommandLis } } -CHIPBindingGeneratedCommandListAttributeCallback::~CHIPBindingGeneratedCommandListAttributeCallback() +CHIPAccessControlExtensionAttributeCallback::~CHIPAccessControlExtensionAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3882,8 +3900,10 @@ CHIPBindingGeneratedCommandListAttributeCallback::~CHIPBindingGeneratedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccessControlExtensionAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3892,8 +3912,8 @@ void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3912,11 +3932,40 @@ void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_data; + jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast(entry_0.data.size())); + env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast(entry_0.data.size()), + reinterpret_cast(entry_0.data.data())); + newElement_0_data = newElement_0_dataByteArray; + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass accessControlExtensionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); + return; + } + + jmethodID accessControlExtensionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", + "([BLjava/lang/Integer;)V", &accessControlExtensionStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + newElement_0_data, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -3924,9 +3973,10 @@ void CHIPBindingGeneratedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingAcceptedCommandListAttributeCallback::CHIPBindingAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlGeneratedCommandListAttributeCallback::CHIPAccessControlGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3942,7 +3992,7 @@ CHIPBindingAcceptedCommandListAttributeCallback::CHIPBindingAcceptedCommandListA } } -CHIPBindingAcceptedCommandListAttributeCallback::~CHIPBindingAcceptedCommandListAttributeCallback() +CHIPAccessControlGeneratedCommandListAttributeCallback::~CHIPAccessControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -3953,8 +4003,8 @@ CHIPBindingAcceptedCommandListAttributeCallback::~CHIPBindingAcceptedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -3963,8 +4013,8 @@ void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -3995,8 +4045,10 @@ void CHIPBindingAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingEventListAttributeCallback::CHIPBindingEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlAcceptedCommandListAttributeCallback::CHIPAccessControlAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4012,7 +4064,7 @@ CHIPBindingEventListAttributeCallback::CHIPBindingEventListAttributeCallback(job } } -CHIPBindingEventListAttributeCallback::~CHIPBindingEventListAttributeCallback() +CHIPAccessControlAcceptedCommandListAttributeCallback::~CHIPAccessControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4023,8 +4075,8 @@ CHIPBindingEventListAttributeCallback::~CHIPBindingEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4033,8 +4085,8 @@ void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4065,8 +4117,8 @@ void CHIPBindingEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBindingAttributeListAttributeCallback::CHIPBindingAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlEventListAttributeCallback::CHIPAccessControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4082,7 +4134,7 @@ CHIPBindingAttributeListAttributeCallback::CHIPBindingAttributeListAttributeCall } } -CHIPBindingAttributeListAttributeCallback::~CHIPBindingAttributeListAttributeCallback() +CHIPAccessControlEventListAttributeCallback::~CHIPAccessControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4093,8 +4145,8 @@ CHIPBindingAttributeListAttributeCallback::~CHIPBindingAttributeListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4103,8 +4155,8 @@ void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4135,8 +4187,9 @@ void CHIPBindingAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlAclAttributeCallback::CHIPAccessControlAclAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAccessControlAttributeListAttributeCallback::CHIPAccessControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4152,7 +4205,7 @@ CHIPAccessControlAclAttributeCallback::CHIPAccessControlAclAttributeCallback(job } } -CHIPAccessControlAclAttributeCallback::~CHIPAccessControlAclAttributeCallback() +CHIPAccessControlAttributeListAttributeCallback::~CHIPAccessControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4163,10 +4216,8 @@ CHIPAccessControlAclAttributeCallback::~CHIPAccessControlAclAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlAclAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & list) +void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4175,8 +4226,8 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4195,165 +4246,20 @@ void CHIPAccessControlAclAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_privilege; - std::string newElement_0_privilegeClassName = "java/lang/Integer"; - std::string newElement_0_privilegeCtorSignature = "(I)V"; - jint jninewElement_0_privilege = static_cast(entry_0.privilege); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_privilegeClassName.c_str(), - newElement_0_privilegeCtorSignature.c_str(), - jninewElement_0_privilege, newElement_0_privilege); - jobject newElement_0_authMode; - std::string newElement_0_authModeClassName = "java/lang/Integer"; - std::string newElement_0_authModeCtorSignature = "(I)V"; - jint jninewElement_0_authMode = static_cast(entry_0.authMode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_authModeClassName.c_str(), - newElement_0_authModeCtorSignature.c_str(), - jninewElement_0_authMode, newElement_0_authMode); - jobject newElement_0_subjects; - if (entry_0.subjects.IsNull()) - { - newElement_0_subjects = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_subjects); - - auto iter_newElement_0_subjects_3 = entry_0.subjects.Value().begin(); - while (iter_newElement_0_subjects_3.Next()) - { - auto & entry_3 = iter_newElement_0_subjects_3.GetValue(); - jobject newElement_3; - std::string newElement_3ClassName = "java/lang/Long"; - std::string newElement_3CtorSignature = "(J)V"; - jlong jninewElement_3 = static_cast(entry_3); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3); - chip::JniReferences::GetInstance().AddToList(newElement_0_subjects, newElement_3); - } - } - jobject newElement_0_targets; - if (entry_0.targets.IsNull()) - { - newElement_0_targets = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_targets); - - auto iter_newElement_0_targets_3 = entry_0.targets.Value().begin(); - while (iter_newElement_0_targets_3.Next()) - { - auto & entry_3 = iter_newElement_0_targets_3.GetValue(); - jobject newElement_3; - jobject newElement_3_cluster; - if (entry_3.cluster.IsNull()) - { - newElement_3_cluster = nullptr; - } - else - { - std::string newElement_3_clusterClassName = "java/lang/Long"; - std::string newElement_3_clusterCtorSignature = "(J)V"; - jlong jninewElement_3_cluster = static_cast(entry_3.cluster.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_clusterClassName.c_str(), - newElement_3_clusterCtorSignature.c_str(), - jninewElement_3_cluster, newElement_3_cluster); - } - jobject newElement_3_endpoint; - if (entry_3.endpoint.IsNull()) - { - newElement_3_endpoint = nullptr; - } - else - { - std::string newElement_3_endpointClassName = "java/lang/Integer"; - std::string newElement_3_endpointCtorSignature = "(I)V"; - jint jninewElement_3_endpoint = static_cast(entry_3.endpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_3_endpointClassName.c_str(), - newElement_3_endpointCtorSignature.c_str(), - jninewElement_3_endpoint, newElement_3_endpoint); - } - jobject newElement_3_deviceType; - if (entry_3.deviceType.IsNull()) - { - newElement_3_deviceType = nullptr; - } - else - { - std::string newElement_3_deviceTypeClassName = "java/lang/Long"; - std::string newElement_3_deviceTypeCtorSignature = "(J)V"; - jlong jninewElement_3_deviceType = static_cast(entry_3.deviceType.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_deviceTypeClassName.c_str(), newElement_3_deviceTypeCtorSignature.c_str(), - jninewElement_3_deviceType, newElement_3_deviceType); - } - - jclass accessControlTargetStructStructClass_4; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", - accessControlTargetStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); - return; - } - - jmethodID accessControlTargetStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlTargetStructStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", - &accessControlTargetStructStructCtor_4); - if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); - return; - } - - newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, - newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); - chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); - } - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass accessControlEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", - accessControlEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); - return; - } - - jmethodID accessControlEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlEntryStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &accessControlEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, newElement_0_privilege, - newElement_0_authMode, newElement_0_subjects, newElement_0_targets, newElement_0_fabricIndex); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlExtensionAttributeCallback::CHIPAccessControlExtensionAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActionsActionListAttributeCallback::CHIPActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4369,7 +4275,7 @@ CHIPAccessControlExtensionAttributeCallback::CHIPAccessControlExtensionAttribute } } -CHIPAccessControlExtensionAttributeCallback::~CHIPAccessControlExtensionAttributeCallback() +CHIPActionsActionListAttributeCallback::~CHIPActionsActionListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4380,10 +4286,9 @@ CHIPAccessControlExtensionAttributeCallback::~CHIPAccessControlExtensionAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlExtensionAttributeCallback::CallbackFn( +void CHIPActionsActionListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4392,8 +4297,8 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4412,40 +4317,66 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_data; - jbyteArray newElement_0_dataByteArray = env->NewByteArray(static_cast(entry_0.data.size())); - env->SetByteArrayRegion(newElement_0_dataByteArray, 0, static_cast(entry_0.data.size()), - reinterpret_cast(entry_0.data.data())); - newElement_0_data = newElement_0_dataByteArray; - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_actionID; + std::string newElement_0_actionIDClassName = "java/lang/Integer"; + std::string newElement_0_actionIDCtorSignature = "(I)V"; + jint jninewElement_0_actionID = static_cast(entry_0.actionID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), + newElement_0_actionIDCtorSignature.c_str(), + jninewElement_0_actionID, newElement_0_actionID); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); + jobject newElement_0_endpointListID; + std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; + std::string newElement_0_endpointListIDCtorSignature = "(I)V"; + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); + jobject newElement_0_supportedCommands; + std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; + std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; + jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), + jninewElement_0_supportedCommands, newElement_0_supportedCommands); + jobject newElement_0_state; + std::string newElement_0_stateClassName = "java/lang/Integer"; + std::string newElement_0_stateCtorSignature = "(I)V"; + jint jninewElement_0_state = static_cast(entry_0.state); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), + newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, + newElement_0_state); - jclass accessControlExtensionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", - accessControlExtensionStructStructClass_1); + jclass actionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", + actionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); return; } - jmethodID accessControlExtensionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", - "([BLjava/lang/Integer;)V", &accessControlExtensionStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) + jmethodID actionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, actionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &actionStructStructCtor_1); + if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); return; } - newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, - newElement_0_data, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, newElement_0_name, + newElement_0_type, newElement_0_endpointListID, newElement_0_supportedCommands, newElement_0_state); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4453,10 +4384,8 @@ void CHIPAccessControlExtensionAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlGeneratedCommandListAttributeCallback::CHIPAccessControlGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPActionsEndpointListsAttributeCallback::CHIPActionsEndpointListsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4472,7 +4401,7 @@ CHIPAccessControlGeneratedCommandListAttributeCallback::CHIPAccessControlGenerat } } -CHIPAccessControlGeneratedCommandListAttributeCallback::~CHIPAccessControlGeneratedCommandListAttributeCallback() +CHIPActionsEndpointListsAttributeCallback::~CHIPActionsEndpointListsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4483,8 +4412,9 @@ CHIPAccessControlGeneratedCommandListAttributeCallback::~CHIPAccessControlGenera env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPActionsEndpointListsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4493,8 +4423,8 @@ void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4513,22 +4443,68 @@ void CHIPAccessControlGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } + jobject newElement_0_endpointListID; + std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; + std::string newElement_0_endpointListIDCtorSignature = "(I)V"; + jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), + newElement_0_endpointListIDCtorSignature.c_str(), + jninewElement_0_endpointListID, newElement_0_endpointListID); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); + jobject newElement_0_endpoints; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); + + auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); + while (iter_newElement_0_endpoints_2.Next()) + { + auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); + jobject newElement_2; + std::string newElement_2ClassName = "java/lang/Integer"; + std::string newElement_2CtorSignature = "(I)V"; + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); + chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); + } + + jclass endpointListStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); + return; + } + + jmethodID endpointListStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, endpointListStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &endpointListStructStructCtor_1); + if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); + return; + } + + newElement_0 = env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, + newElement_0_name, newElement_0_type, newElement_0_endpoints); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlAcceptedCommandListAttributeCallback::CHIPAccessControlAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPActionsGeneratedCommandListAttributeCallback::CHIPActionsGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4544,7 +4520,7 @@ CHIPAccessControlAcceptedCommandListAttributeCallback::CHIPAccessControlAccepted } } -CHIPAccessControlAcceptedCommandListAttributeCallback::~CHIPAccessControlAcceptedCommandListAttributeCallback() +CHIPActionsGeneratedCommandListAttributeCallback::~CHIPActionsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4555,8 +4531,8 @@ CHIPAccessControlAcceptedCommandListAttributeCallback::~CHIPAccessControlAccepte env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4565,8 +4541,8 @@ void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4597,8 +4573,9 @@ void CHIPAccessControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlEventListAttributeCallback::CHIPAccessControlEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActionsAcceptedCommandListAttributeCallback::CHIPActionsAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4614,7 +4591,7 @@ CHIPAccessControlEventListAttributeCallback::CHIPAccessControlEventListAttribute } } -CHIPAccessControlEventListAttributeCallback::~CHIPAccessControlEventListAttributeCallback() +CHIPActionsAcceptedCommandListAttributeCallback::~CHIPActionsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4625,8 +4602,8 @@ CHIPAccessControlEventListAttributeCallback::~CHIPAccessControlEventListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4635,8 +4612,8 @@ void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4667,9 +4644,8 @@ void CHIPAccessControlEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAccessControlAttributeListAttributeCallback::CHIPAccessControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActionsEventListAttributeCallback::CHIPActionsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4685,7 +4661,7 @@ CHIPAccessControlAttributeListAttributeCallback::CHIPAccessControlAttributeListA } } -CHIPAccessControlAttributeListAttributeCallback::~CHIPAccessControlAttributeListAttributeCallback() +CHIPActionsEventListAttributeCallback::~CHIPActionsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4696,8 +4672,8 @@ CHIPAccessControlAttributeListAttributeCallback::~CHIPAccessControlAttributeList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4706,8 +4682,8 @@ void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4738,8 +4714,8 @@ void CHIPAccessControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsActionListAttributeCallback::CHIPActionsActionListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActionsAttributeListAttributeCallback::CHIPActionsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4755,7 +4731,7 @@ CHIPActionsActionListAttributeCallback::CHIPActionsActionListAttributeCallback(j } } -CHIPActionsActionListAttributeCallback::~CHIPActionsActionListAttributeCallback() +CHIPActionsAttributeListAttributeCallback::~CHIPActionsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4766,9 +4742,8 @@ CHIPActionsActionListAttributeCallback::~CHIPActionsActionListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsActionListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4777,8 +4752,8 @@ void CHIPActionsActionListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4797,66 +4772,11 @@ void CHIPActionsActionListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_actionID; - std::string newElement_0_actionIDClassName = "java/lang/Integer"; - std::string newElement_0_actionIDCtorSignature = "(I)V"; - jint jninewElement_0_actionID = static_cast(entry_0.actionID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_actionIDClassName.c_str(), - newElement_0_actionIDCtorSignature.c_str(), - jninewElement_0_actionID, newElement_0_actionID); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - jobject newElement_0_endpointListID; - std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; - std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - jninewElement_0_endpointListID, newElement_0_endpointListID); - jobject newElement_0_supportedCommands; - std::string newElement_0_supportedCommandsClassName = "java/lang/Integer"; - std::string newElement_0_supportedCommandsCtorSignature = "(I)V"; - jint jninewElement_0_supportedCommands = static_cast(entry_0.supportedCommands.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_supportedCommandsClassName.c_str(), newElement_0_supportedCommandsCtorSignature.c_str(), - jninewElement_0_supportedCommands, newElement_0_supportedCommands); - jobject newElement_0_state; - std::string newElement_0_stateClassName = "java/lang/Integer"; - std::string newElement_0_stateCtorSignature = "(I)V"; - jint jninewElement_0_state = static_cast(entry_0.state); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_stateClassName.c_str(), - newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, - newElement_0_state); - - jclass actionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", - actionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); - return; - } - - jmethodID actionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, actionStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &actionStructStructCtor_1); - if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, newElement_0_name, - newElement_0_type, newElement_0_endpointListID, newElement_0_supportedCommands, newElement_0_state); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4864,8 +4784,10 @@ void CHIPActionsActionListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsEndpointListsAttributeCallback::CHIPActionsEndpointListsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBasicInformationGeneratedCommandListAttributeCallback::CHIPBasicInformationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4881,7 +4803,7 @@ CHIPActionsEndpointListsAttributeCallback::CHIPActionsEndpointListsAttributeCall } } -CHIPActionsEndpointListsAttributeCallback::~CHIPActionsEndpointListsAttributeCallback() +CHIPBasicInformationGeneratedCommandListAttributeCallback::~CHIPBasicInformationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -4892,9 +4814,8 @@ CHIPActionsEndpointListsAttributeCallback::~CHIPActionsEndpointListsAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsEndpointListsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -4903,8 +4824,8 @@ void CHIPActionsEndpointListsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -4923,58 +4844,11 @@ void CHIPActionsEndpointListsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_endpointListID; - std::string newElement_0_endpointListIDClassName = "java/lang/Integer"; - std::string newElement_0_endpointListIDCtorSignature = "(I)V"; - jint jninewElement_0_endpointListID = static_cast(entry_0.endpointListID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointListIDClassName.c_str(), - newElement_0_endpointListIDCtorSignature.c_str(), - jninewElement_0_endpointListID, newElement_0_endpointListID); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - jobject newElement_0_endpoints; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); - - auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); - while (iter_newElement_0_endpoints_2.Next()) - { - auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); - } - - jclass endpointListStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); - return; - } - - jmethodID endpointListStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, endpointListStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &endpointListStructStructCtor_1); - if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); - return; - } - - newElement_0 = env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, - newElement_0_name, newElement_0_type, newElement_0_endpoints); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -4982,9 +4856,10 @@ void CHIPActionsEndpointListsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsGeneratedCommandListAttributeCallback::CHIPActionsGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBasicInformationAcceptedCommandListAttributeCallback::CHIPBasicInformationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5000,7 +4875,7 @@ CHIPActionsGeneratedCommandListAttributeCallback::CHIPActionsGeneratedCommandLis } } -CHIPActionsGeneratedCommandListAttributeCallback::~CHIPActionsGeneratedCommandListAttributeCallback() +CHIPBasicInformationAcceptedCommandListAttributeCallback::~CHIPBasicInformationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5011,8 +4886,8 @@ CHIPActionsGeneratedCommandListAttributeCallback::~CHIPActionsGeneratedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5021,8 +4896,8 @@ void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5053,9 +4928,9 @@ void CHIPActionsGeneratedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsAcceptedCommandListAttributeCallback::CHIPActionsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBasicInformationEventListAttributeCallback::CHIPBasicInformationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5071,7 +4946,7 @@ CHIPActionsAcceptedCommandListAttributeCallback::CHIPActionsAcceptedCommandListA } } -CHIPActionsAcceptedCommandListAttributeCallback::~CHIPActionsAcceptedCommandListAttributeCallback() +CHIPBasicInformationEventListAttributeCallback::~CHIPBasicInformationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5082,8 +4957,8 @@ CHIPActionsAcceptedCommandListAttributeCallback::~CHIPActionsAcceptedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5092,8 +4967,8 @@ void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5124,8 +4999,9 @@ void CHIPActionsAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsEventListAttributeCallback::CHIPActionsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBasicInformationAttributeListAttributeCallback::CHIPBasicInformationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5141,7 +5017,7 @@ CHIPActionsEventListAttributeCallback::CHIPActionsEventListAttributeCallback(job } } -CHIPActionsEventListAttributeCallback::~CHIPActionsEventListAttributeCallback() +CHIPBasicInformationAttributeListAttributeCallback::~CHIPBasicInformationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5152,8 +5028,8 @@ CHIPActionsEventListAttributeCallback::~CHIPActionsEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5162,8 +5038,8 @@ void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5194,8 +5070,10 @@ void CHIPActionsEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActionsAttributeListAttributeCallback::CHIPActionsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: + CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5211,7 +5089,8 @@ CHIPActionsAttributeListAttributeCallback::CHIPActionsAttributeListAttributeCall } } -CHIPActionsAttributeListAttributeCallback::~CHIPActionsAttributeListAttributeCallback() +CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: + ~CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5222,8 +5101,8 @@ CHIPActionsAttributeListAttributeCallback::~CHIPActionsAttributeListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5232,8 +5111,8 @@ void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5264,9 +5143,9 @@ void CHIPActionsAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBasicInformationGeneratedCommandListAttributeCallback::CHIPBasicInformationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: + CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5283,7 +5162,8 @@ CHIPBasicInformationGeneratedCommandListAttributeCallback::CHIPBasicInformationG } } -CHIPBasicInformationGeneratedCommandListAttributeCallback::~CHIPBasicInformationGeneratedCommandListAttributeCallback() +CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: + ~CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5294,7 +5174,7 @@ CHIPBasicInformationGeneratedCommandListAttributeCallback::~CHIPBasicInformation env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -5304,8 +5184,8 @@ void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5336,9 +5216,9 @@ void CHIPBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBasicInformationAcceptedCommandListAttributeCallback::CHIPBasicInformationAcceptedCommandListAttributeCallback( +CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CHIPOtaSoftwareUpdateProviderEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5355,7 +5235,7 @@ CHIPBasicInformationAcceptedCommandListAttributeCallback::CHIPBasicInformationAc } } -CHIPBasicInformationAcceptedCommandListAttributeCallback::~CHIPBasicInformationAcceptedCommandListAttributeCallback() +CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::~CHIPOtaSoftwareUpdateProviderEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5366,8 +5246,8 @@ CHIPBasicInformationAcceptedCommandListAttributeCallback::~CHIPBasicInformationA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5376,8 +5256,8 @@ void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5408,9 +5288,10 @@ void CHIPBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBasicInformationEventListAttributeCallback::CHIPBasicInformationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5426,7 +5307,7 @@ CHIPBasicInformationEventListAttributeCallback::CHIPBasicInformationEventListAtt } } -CHIPBasicInformationEventListAttributeCallback::~CHIPBasicInformationEventListAttributeCallback() +CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5437,8 +5318,8 @@ CHIPBasicInformationEventListAttributeCallback::~CHIPBasicInformationEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5447,8 +5328,8 @@ void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5479,9 +5360,10 @@ void CHIPBasicInformationEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBasicInformationAttributeListAttributeCallback::CHIPBasicInformationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: + CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5497,7 +5379,8 @@ CHIPBasicInformationAttributeListAttributeCallback::CHIPBasicInformationAttribut } } -CHIPBasicInformationAttributeListAttributeCallback::~CHIPBasicInformationAttributeListAttributeCallback() +CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: + ~CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5508,8 +5391,10 @@ CHIPBasicInformationAttributeListAttributeCallback::~CHIPBasicInformationAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5518,8 +5403,8 @@ void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5538,11 +5423,50 @@ void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_providerNodeID; + std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; + std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; + jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), + newElement_0_providerNodeIDCtorSignature.c_str(), + jninewElement_0_providerNodeID, newElement_0_providerNodeID); + jobject newElement_0_endpoint; + std::string newElement_0_endpointClassName = "java/lang/Integer"; + std::string newElement_0_endpointCtorSignature = "(I)V"; + jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), + newElement_0_endpointCtorSignature.c_str(), + jninewElement_0_endpoint, newElement_0_endpoint); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass providerLocationStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", + providerLocationStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); + return; + } + + jmethodID providerLocationStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &providerLocationStructCtor_1); + if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); + return; + } + + newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, newElement_0_providerNodeID, + newElement_0_endpoint, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5550,9 +5474,9 @@ void CHIPBasicInformationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: + CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5569,8 +5493,8 @@ CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: } } -CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback() +CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: + ~CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5581,8 +5505,8 @@ CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5590,9 +5514,8 @@ void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5600,32 +5523,29 @@ void CHIPOtaSoftwareUpdateProviderGeneratedCommandListAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: + CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5642,8 +5562,8 @@ CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: } } -CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback() +CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: + ~CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5654,7 +5574,7 @@ CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -5664,8 +5584,8 @@ void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5696,9 +5616,9 @@ void CHIPOtaSoftwareUpdateProviderAcceptedCommandListAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CHIPOtaSoftwareUpdateProviderEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: + CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5715,7 +5635,8 @@ CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CHIPOtaSoftwareUpdatePr } } -CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::~CHIPOtaSoftwareUpdateProviderEventListAttributeCallback() +CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: + ~CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5726,8 +5647,8 @@ CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::~CHIPOtaSoftwareUpdateP env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5736,8 +5657,8 @@ void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5768,9 +5689,9 @@ void CHIPOtaSoftwareUpdateProviderEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback( +CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5787,7 +5708,7 @@ CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CHIPOtaSoftwareUpda } } -CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback() +CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5798,8 +5719,8 @@ CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::~CHIPOtaSoftwareUpd env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5808,9 +5729,9 @@ void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, @@ -5840,9 +5761,9 @@ void CHIPOtaSoftwareUpdateProviderAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5859,8 +5780,7 @@ CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: } } -CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback() +CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5871,10 +5791,8 @@ CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & list) +void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5883,8 +5801,8 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -5903,50 +5821,11 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::Callbac { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_providerNodeID; - std::string newElement_0_providerNodeIDClassName = "java/lang/Long"; - std::string newElement_0_providerNodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_providerNodeID = static_cast(entry_0.providerNodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_providerNodeIDClassName.c_str(), - newElement_0_providerNodeIDCtorSignature.c_str(), - jninewElement_0_providerNodeID, newElement_0_providerNodeID); - jobject newElement_0_endpoint; - std::string newElement_0_endpointClassName = "java/lang/Integer"; - std::string newElement_0_endpointCtorSignature = "(I)V"; - jint jninewElement_0_endpoint = static_cast(entry_0.endpoint); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_endpointClassName.c_str(), - newElement_0_endpointCtorSignature.c_str(), - jninewElement_0_endpoint, newElement_0_endpoint); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass providerLocationStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", - providerLocationStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); - return; - } - - jmethodID providerLocationStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &providerLocationStructCtor_1); - if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); - return; - } - - newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, newElement_0_providerNodeID, - newElement_0_endpoint, newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -5954,9 +5833,9 @@ void CHIPOtaSoftwareUpdateRequestorDefaultOTAProvidersAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalizationConfigurationSupportedLocalesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -5973,8 +5852,7 @@ CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: } } -CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback() +CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -5985,8 +5863,8 @@ CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -5994,8 +5872,9 @@ void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::Callbac jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6003,29 +5882,28 @@ void CHIPOtaSoftwareUpdateRequestorUpdateStateProgressAttributeCallback::Callbac ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: + CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6042,8 +5920,8 @@ CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: } } -CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback() +CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: + ~CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6054,7 +5932,7 @@ CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6064,8 +5942,8 @@ void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6096,9 +5974,9 @@ void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: - CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: + CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6115,8 +5993,8 @@ CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: } } -CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: - ~CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback() +CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: + ~CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6127,7 +6005,7 @@ CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6137,8 +6015,8 @@ void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6169,9 +6047,9 @@ void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback( +CHIPLocalizationConfigurationEventListAttributeCallback::CHIPLocalizationConfigurationEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6188,7 +6066,7 @@ CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CHIPOtaSoftwareUpdateR } } -CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback() +CHIPLocalizationConfigurationEventListAttributeCallback::~CHIPLocalizationConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6199,7 +6077,7 @@ CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::~CHIPOtaSoftwareUpdate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( +void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6209,8 +6087,8 @@ void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6241,9 +6119,9 @@ void CHIPOtaSoftwareUpdateRequestorEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback( +CHIPLocalizationConfigurationAttributeListAttributeCallback::CHIPLocalizationConfigurationAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6260,7 +6138,7 @@ CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CHIPOtaSoftwareUpd } } -CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::~CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback() +CHIPLocalizationConfigurationAttributeListAttributeCallback::~CHIPLocalizationConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6271,7 +6149,7 @@ CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::~CHIPOtaSoftwareUp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( +void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6281,8 +6159,8 @@ void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6313,9 +6191,9 @@ void CHIPOtaSoftwareUpdateRequestorAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalizationConfigurationSupportedLocalesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: + CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6332,7 +6210,8 @@ CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CHIPLocalization } } -CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizationConfigurationSupportedLocalesAttributeCallback() +CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: + ~CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6343,8 +6222,8 @@ CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::~CHIPLocalizatio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6353,8 +6232,8 @@ void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6373,7 +6252,11 @@ void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6381,9 +6264,9 @@ void CHIPLocalizationConfigurationSupportedLocalesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: - CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6400,8 +6283,7 @@ CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: } } -CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback() +CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::~CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6412,7 +6294,7 @@ CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6422,8 +6304,8 @@ void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6454,9 +6336,9 @@ void CHIPLocalizationConfigurationGeneratedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: - CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6473,8 +6355,7 @@ CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: } } -CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback() +CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::~CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6485,7 +6366,7 @@ CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6495,8 +6376,8 @@ void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6527,9 +6408,9 @@ void CHIPLocalizationConfigurationAcceptedCommandListAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLocalizationConfigurationEventListAttributeCallback::CHIPLocalizationConfigurationEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTimeFormatLocalizationEventListAttributeCallback::CHIPTimeFormatLocalizationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6546,7 +6427,7 @@ CHIPLocalizationConfigurationEventListAttributeCallback::CHIPLocalizationConfigu } } -CHIPLocalizationConfigurationEventListAttributeCallback::~CHIPLocalizationConfigurationEventListAttributeCallback() +CHIPTimeFormatLocalizationEventListAttributeCallback::~CHIPTimeFormatLocalizationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6557,7 +6438,7 @@ CHIPLocalizationConfigurationEventListAttributeCallback::~CHIPLocalizationConfig env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( +void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6567,8 +6448,8 @@ void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6599,9 +6480,9 @@ void CHIPLocalizationConfigurationEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLocalizationConfigurationAttributeListAttributeCallback::CHIPLocalizationConfigurationAttributeListAttributeCallback( +CHIPTimeFormatLocalizationAttributeListAttributeCallback::CHIPTimeFormatLocalizationAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6618,7 +6499,7 @@ CHIPLocalizationConfigurationAttributeListAttributeCallback::CHIPLocalizationCon } } -CHIPLocalizationConfigurationAttributeListAttributeCallback::~CHIPLocalizationConfigurationAttributeListAttributeCallback() +CHIPTimeFormatLocalizationAttributeListAttributeCallback::~CHIPTimeFormatLocalizationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6629,7 +6510,7 @@ CHIPLocalizationConfigurationAttributeListAttributeCallback::~CHIPLocalizationCo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( +void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6639,8 +6520,8 @@ void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6671,9 +6552,9 @@ void CHIPLocalizationConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: - CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CHIPUnitLocalizationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6690,8 +6571,7 @@ CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: } } -CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: - ~CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback() +CHIPUnitLocalizationGeneratedCommandListAttributeCallback::~CHIPUnitLocalizationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6702,8 +6582,8 @@ CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6712,8 +6592,8 @@ void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6732,11 +6612,11 @@ void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::Callback { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -6744,9 +6624,9 @@ void CHIPTimeFormatLocalizationSupportedCalendarTypesAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback( +CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CHIPUnitLocalizationAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6763,7 +6643,7 @@ CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CHIPTimeFormatL } } -CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::~CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback() +CHIPUnitLocalizationAcceptedCommandListAttributeCallback::~CHIPUnitLocalizationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6774,7 +6654,7 @@ CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::~CHIPTimeFormat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -6784,8 +6664,8 @@ void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6816,10 +6696,9 @@ void CHIPTimeFormatLocalizationGeneratedCommandListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPUnitLocalizationEventListAttributeCallback::CHIPUnitLocalizationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6835,7 +6714,7 @@ CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CHIPTimeFormatLo } } -CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::~CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback() +CHIPUnitLocalizationEventListAttributeCallback::~CHIPUnitLocalizationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6846,8 +6725,8 @@ CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::~CHIPTimeFormatL env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6856,8 +6735,8 @@ void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6888,10 +6767,9 @@ void CHIPTimeFormatLocalizationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeFormatLocalizationEventListAttributeCallback::CHIPTimeFormatLocalizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPUnitLocalizationAttributeListAttributeCallback::CHIPUnitLocalizationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6907,7 +6785,7 @@ CHIPTimeFormatLocalizationEventListAttributeCallback::CHIPTimeFormatLocalization } } -CHIPTimeFormatLocalizationEventListAttributeCallback::~CHIPTimeFormatLocalizationEventListAttributeCallback() +CHIPUnitLocalizationAttributeListAttributeCallback::~CHIPUnitLocalizationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6918,8 +6796,8 @@ CHIPTimeFormatLocalizationEventListAttributeCallback::~CHIPTimeFormatLocalizatio env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -6928,8 +6806,8 @@ void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -6960,9 +6838,9 @@ void CHIPTimeFormatLocalizationEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeFormatLocalizationAttributeListAttributeCallback::CHIPTimeFormatLocalizationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -6979,7 +6857,7 @@ CHIPTimeFormatLocalizationAttributeListAttributeCallback::CHIPTimeFormatLocaliza } } -CHIPTimeFormatLocalizationAttributeListAttributeCallback::~CHIPTimeFormatLocalizationAttributeListAttributeCallback() +CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -6990,8 +6868,8 @@ CHIPTimeFormatLocalizationAttributeListAttributeCallback::~CHIPTimeFormatLocaliz env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7000,8 +6878,8 @@ void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7020,11 +6898,11 @@ void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7032,9 +6910,9 @@ void CHIPTimeFormatLocalizationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CHIPUnitLocalizationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: + CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7051,7 +6929,8 @@ CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CHIPUnitLocalizationG } } -CHIPUnitLocalizationGeneratedCommandListAttributeCallback::~CHIPUnitLocalizationGeneratedCommandListAttributeCallback() +CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: + ~CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7062,7 +6941,7 @@ CHIPUnitLocalizationGeneratedCommandListAttributeCallback::~CHIPUnitLocalization env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -7072,8 +6951,8 @@ void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7104,9 +6983,9 @@ void CHIPUnitLocalizationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CHIPUnitLocalizationAcceptedCommandListAttributeCallback( +CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7123,7 +7002,8 @@ CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CHIPUnitLocalizationAc } } -CHIPUnitLocalizationAcceptedCommandListAttributeCallback::~CHIPUnitLocalizationAcceptedCommandListAttributeCallback() +CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback:: + ~CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7134,7 +7014,7 @@ CHIPUnitLocalizationAcceptedCommandListAttributeCallback::~CHIPUnitLocalizationA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -7144,8 +7024,8 @@ void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7176,9 +7056,10 @@ void CHIPUnitLocalizationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUnitLocalizationEventListAttributeCallback::CHIPUnitLocalizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceConfigurationEventListAttributeCallback::CHIPPowerSourceConfigurationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7194,7 +7075,7 @@ CHIPUnitLocalizationEventListAttributeCallback::CHIPUnitLocalizationEventListAtt } } -CHIPUnitLocalizationEventListAttributeCallback::~CHIPUnitLocalizationEventListAttributeCallback() +CHIPPowerSourceConfigurationEventListAttributeCallback::~CHIPPowerSourceConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7205,8 +7086,8 @@ CHIPUnitLocalizationEventListAttributeCallback::~CHIPUnitLocalizationEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7215,8 +7096,8 @@ void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7247,9 +7128,10 @@ void CHIPUnitLocalizationEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUnitLocalizationAttributeListAttributeCallback::CHIPUnitLocalizationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceConfigurationAttributeListAttributeCallback::CHIPPowerSourceConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7265,7 +7147,7 @@ CHIPUnitLocalizationAttributeListAttributeCallback::CHIPUnitLocalizationAttribut } } -CHIPUnitLocalizationAttributeListAttributeCallback::~CHIPUnitLocalizationAttributeListAttributeCallback() +CHIPPowerSourceConfigurationAttributeListAttributeCallback::~CHIPPowerSourceConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7276,7 +7158,7 @@ CHIPUnitLocalizationAttributeListAttributeCallback::~CHIPUnitLocalizationAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( +void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -7286,8 +7168,8 @@ void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7318,9 +7200,9 @@ void CHIPUnitLocalizationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurationSourcesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7337,7 +7219,7 @@ CHIPPowerSourceConfigurationSourcesAttributeCallback::CHIPPowerSourceConfigurati } } -CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurationSourcesAttributeCallback() +CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::~CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7348,8 +7230,8 @@ CHIPPowerSourceConfigurationSourcesAttributeCallback::~CHIPPowerSourceConfigurat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7357,9 +7239,8 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7367,32 +7248,29 @@ void CHIPPowerSourceConfigurationSourcesAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: - CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7409,8 +7287,7 @@ CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: } } -CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback() +CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::~CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7421,8 +7298,8 @@ CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7430,9 +7307,8 @@ void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7440,32 +7316,29 @@ void CHIPPowerSourceConfigurationGeneratedCommandListAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CHIPPowerSourceWiredAssessedCurrentAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -7482,8 +7355,7 @@ CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CHIPPowerSourc } } -CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback() +CHIPPowerSourceWiredAssessedCurrentAttributeCallback::~CHIPPowerSourceWiredAssessedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7494,8 +7366,8 @@ CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7503,9 +7375,8 @@ void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7513,105 +7384,29 @@ void CHIPPowerSourceConfigurationAcceptedCommandListAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPPowerSourceConfigurationEventListAttributeCallback::CHIPPowerSourceConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPPowerSourceConfigurationEventListAttributeCallback::~CHIPPowerSourceConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) + jobject javaValue; + if (value.IsNull()) { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; + javaValue = nullptr; } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPPowerSourceConfigurationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + else { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceConfigurationAttributeListAttributeCallback::CHIPPowerSourceConfigurationAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPowerSourceActiveWiredFaultsAttributeCallback::CHIPPowerSourceActiveWiredFaultsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7627,7 +7422,7 @@ CHIPPowerSourceConfigurationAttributeListAttributeCallback::CHIPPowerSourceConfi } } -CHIPPowerSourceConfigurationAttributeListAttributeCallback::~CHIPPowerSourceConfigurationAttributeListAttributeCallback() +CHIPPowerSourceActiveWiredFaultsAttributeCallback::~CHIPPowerSourceActiveWiredFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7638,8 +7433,8 @@ CHIPPowerSourceConfigurationAttributeListAttributeCallback::~CHIPPowerSourceConf env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7648,8 +7443,8 @@ void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7668,11 +7463,11 @@ void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -7680,10 +7475,8 @@ void CHIPPowerSourceConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPowerSourceBatVoltageAttributeCallback::CHIPPowerSourceBatVoltageAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7699,7 +7492,7 @@ CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CHIPPowerSourceWiredA } } -CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::~CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback() +CHIPPowerSourceBatVoltageAttributeCallback::~CHIPPowerSourceBatVoltageAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7710,8 +7503,7 @@ CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::~CHIPPowerSourceWired env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7719,8 +7511,8 @@ void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7748,10 +7540,9 @@ void CHIPPowerSourceWiredAssessedInputVoltageAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPowerSourceBatPercentRemainingAttributeCallback::CHIPPowerSourceBatPercentRemainingAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7767,7 +7558,7 @@ CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CHIPPowerSourceWire } } -CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::~CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback() +CHIPPowerSourceBatPercentRemainingAttributeCallback::~CHIPPowerSourceBatPercentRemainingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7778,8 +7569,8 @@ CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::~CHIPPowerSourceWir env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7787,8 +7578,8 @@ void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7816,10 +7607,9 @@ void CHIPPowerSourceWiredAssessedInputFrequencyAttributeCallback::CallbackFn(voi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CHIPPowerSourceWiredAssessedCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPowerSourceBatTimeRemainingAttributeCallback::CHIPPowerSourceBatTimeRemainingAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7835,7 +7625,7 @@ CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CHIPPowerSourceWiredAssess } } -CHIPPowerSourceWiredAssessedCurrentAttributeCallback::~CHIPPowerSourceWiredAssessedCurrentAttributeCallback() +CHIPPowerSourceBatTimeRemainingAttributeCallback::~CHIPPowerSourceBatTimeRemainingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7846,8 +7636,8 @@ CHIPPowerSourceWiredAssessedCurrentAttributeCallback::~CHIPPowerSourceWiredAsses env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7855,8 +7645,8 @@ void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7884,9 +7674,9 @@ void CHIPPowerSourceWiredAssessedCurrentAttributeCallback::CallbackFn(void * con env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceActiveWiredFaultsAttributeCallback::CHIPPowerSourceActiveWiredFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceActiveBatFaultsAttributeCallback::CHIPPowerSourceActiveBatFaultsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7902,7 +7692,7 @@ CHIPPowerSourceActiveWiredFaultsAttributeCallback::CHIPPowerSourceActiveWiredFau } } -CHIPPowerSourceActiveWiredFaultsAttributeCallback::~CHIPPowerSourceActiveWiredFaultsAttributeCallback() +CHIPPowerSourceActiveBatFaultsAttributeCallback::~CHIPPowerSourceActiveBatFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7913,8 +7703,8 @@ CHIPPowerSourceActiveWiredFaultsAttributeCallback::~CHIPPowerSourceActiveWiredFa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7923,8 +7713,8 @@ void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -7955,8 +7745,9 @@ void CHIPPowerSourceActiveWiredFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceBatVoltageAttributeCallback::CHIPPowerSourceBatVoltageAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CHIPPowerSourceBatTimeToFullChargeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7972,7 +7763,7 @@ CHIPPowerSourceBatVoltageAttributeCallback::CHIPPowerSourceBatVoltageAttributeCa } } -CHIPPowerSourceBatVoltageAttributeCallback::~CHIPPowerSourceBatVoltageAttributeCallback() +CHIPPowerSourceBatTimeToFullChargeAttributeCallback::~CHIPPowerSourceBatTimeToFullChargeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -7983,7 +7774,8 @@ CHIPPowerSourceBatVoltageAttributeCallback::~CHIPPowerSourceBatVoltageAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -7991,8 +7783,8 @@ void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8020,9 +7812,9 @@ void CHIPPowerSourceBatVoltageAttributeCallback::CallbackFn(void * context, cons env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceBatPercentRemainingAttributeCallback::CHIPPowerSourceBatPercentRemainingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceBatChargingCurrentAttributeCallback::CHIPPowerSourceBatChargingCurrentAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8038,7 +7830,7 @@ CHIPPowerSourceBatPercentRemainingAttributeCallback::CHIPPowerSourceBatPercentRe } } -CHIPPowerSourceBatPercentRemainingAttributeCallback::~CHIPPowerSourceBatPercentRemainingAttributeCallback() +CHIPPowerSourceBatChargingCurrentAttributeCallback::~CHIPPowerSourceBatChargingCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8049,8 +7841,8 @@ CHIPPowerSourceBatPercentRemainingAttributeCallback::~CHIPPowerSourceBatPercentR env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8058,8 +7850,8 @@ void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8067,7 +7859,7 @@ void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * cont ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -8077,19 +7869,20 @@ void CHIPPowerSourceBatPercentRemainingAttributeCallback::CallbackFn(void * cont } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPPowerSourceBatTimeRemainingAttributeCallback::CHIPPowerSourceBatTimeRemainingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CHIPPowerSourceActiveBatChargeFaultsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8105,7 +7898,7 @@ CHIPPowerSourceBatTimeRemainingAttributeCallback::CHIPPowerSourceBatTimeRemainin } } -CHIPPowerSourceBatTimeRemainingAttributeCallback::~CHIPPowerSourceBatTimeRemainingAttributeCallback() +CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::~CHIPPowerSourceActiveBatChargeFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8116,8 +7909,8 @@ CHIPPowerSourceBatTimeRemainingAttributeCallback::~CHIPPowerSourceBatTimeRemaini env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8125,8 +7918,9 @@ void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8134,29 +7928,31 @@ void CHIPPowerSourceBatTimeRemainingAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceActiveBatFaultsAttributeCallback::CHIPPowerSourceActiveBatFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceEndpointListAttributeCallback::CHIPPowerSourceEndpointListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8172,7 +7968,7 @@ CHIPPowerSourceActiveBatFaultsAttributeCallback::CHIPPowerSourceActiveBatFaultsA } } -CHIPPowerSourceActiveBatFaultsAttributeCallback::~CHIPPowerSourceActiveBatFaultsAttributeCallback() +CHIPPowerSourceEndpointListAttributeCallback::~CHIPPowerSourceEndpointListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8183,8 +7979,8 @@ CHIPPowerSourceActiveBatFaultsAttributeCallback::~CHIPPowerSourceActiveBatFaults env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8193,8 +7989,8 @@ void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8225,9 +8021,10 @@ void CHIPPowerSourceActiveBatFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CHIPPowerSourceBatTimeToFullChargeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceGeneratedCommandListAttributeCallback::CHIPPowerSourceGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8243,7 +8040,7 @@ CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CHIPPowerSourceBatTimeToFul } } -CHIPPowerSourceBatTimeToFullChargeAttributeCallback::~CHIPPowerSourceBatTimeToFullChargeAttributeCallback() +CHIPPowerSourceGeneratedCommandListAttributeCallback::~CHIPPowerSourceGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8254,8 +8051,8 @@ CHIPPowerSourceBatTimeToFullChargeAttributeCallback::~CHIPPowerSourceBatTimeToFu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8263,8 +8060,9 @@ void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8272,29 +8070,32 @@ void CHIPPowerSourceBatTimeToFullChargeAttributeCallback::CallbackFn(void * cont ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceBatChargingCurrentAttributeCallback::CHIPPowerSourceBatChargingCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceAcceptedCommandListAttributeCallback::CHIPPowerSourceAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8310,7 +8111,7 @@ CHIPPowerSourceBatChargingCurrentAttributeCallback::CHIPPowerSourceBatChargingCu } } -CHIPPowerSourceBatChargingCurrentAttributeCallback::~CHIPPowerSourceBatChargingCurrentAttributeCallback() +CHIPPowerSourceAcceptedCommandListAttributeCallback::~CHIPPowerSourceAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8321,8 +8122,8 @@ CHIPPowerSourceBatChargingCurrentAttributeCallback::~CHIPPowerSourceBatChargingC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8330,8 +8131,9 @@ void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8339,30 +8141,31 @@ void CHIPPowerSourceBatChargingCurrentAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CHIPPowerSourceActiveBatChargeFaultsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPPowerSourceEventListAttributeCallback::CHIPPowerSourceEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8378,7 +8181,7 @@ CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CHIPPowerSourceActiveBatC } } -CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::~CHIPPowerSourceActiveBatChargeFaultsAttributeCallback() +CHIPPowerSourceEventListAttributeCallback::~CHIPPowerSourceEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8389,8 +8192,8 @@ CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::~CHIPPowerSourceActiveBat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8399,8 +8202,8 @@ void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8419,11 +8222,11 @@ void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8431,8 +8234,8 @@ void CHIPPowerSourceActiveBatChargeFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceEndpointListAttributeCallback::CHIPPowerSourceEndpointListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPPowerSourceAttributeListAttributeCallback::CHIPPowerSourceAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8448,7 +8251,7 @@ CHIPPowerSourceEndpointListAttributeCallback::CHIPPowerSourceEndpointListAttribu } } -CHIPPowerSourceEndpointListAttributeCallback::~CHIPPowerSourceEndpointListAttributeCallback() +CHIPPowerSourceAttributeListAttributeCallback::~CHIPPowerSourceAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8459,8 +8262,8 @@ CHIPPowerSourceEndpointListAttributeCallback::~CHIPPowerSourceEndpointListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8469,8 +8272,8 @@ void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8489,11 +8292,11 @@ void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8501,9 +8304,9 @@ void CHIPPowerSourceEndpointListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceGeneratedCommandListAttributeCallback::CHIPPowerSourceGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CHIPGeneralCommissioningGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -8520,7 +8323,7 @@ CHIPPowerSourceGeneratedCommandListAttributeCallback::CHIPPowerSourceGeneratedCo } } -CHIPPowerSourceGeneratedCommandListAttributeCallback::~CHIPPowerSourceGeneratedCommandListAttributeCallback() +CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::~CHIPGeneralCommissioningGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8531,7 +8334,7 @@ CHIPPowerSourceGeneratedCommandListAttributeCallback::~CHIPPowerSourceGeneratedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -8541,8 +8344,8 @@ void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8573,9 +8376,10 @@ void CHIPPowerSourceGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceAcceptedCommandListAttributeCallback::CHIPPowerSourceAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CHIPGeneralCommissioningAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8591,7 +8395,7 @@ CHIPPowerSourceAcceptedCommandListAttributeCallback::CHIPPowerSourceAcceptedComm } } -CHIPPowerSourceAcceptedCommandListAttributeCallback::~CHIPPowerSourceAcceptedCommandListAttributeCallback() +CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::~CHIPGeneralCommissioningAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8602,7 +8406,7 @@ CHIPPowerSourceAcceptedCommandListAttributeCallback::~CHIPPowerSourceAcceptedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -8612,8 +8416,8 @@ void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8644,8 +8448,9 @@ void CHIPPowerSourceAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceEventListAttributeCallback::CHIPPowerSourceEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralCommissioningEventListAttributeCallback::CHIPGeneralCommissioningEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8661,7 +8466,7 @@ CHIPPowerSourceEventListAttributeCallback::CHIPPowerSourceEventListAttributeCall } } -CHIPPowerSourceEventListAttributeCallback::~CHIPPowerSourceEventListAttributeCallback() +CHIPGeneralCommissioningEventListAttributeCallback::~CHIPGeneralCommissioningEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8672,8 +8477,8 @@ CHIPPowerSourceEventListAttributeCallback::~CHIPPowerSourceEventListAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8682,8 +8487,8 @@ void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8714,8 +8519,10 @@ void CHIPPowerSourceEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPPowerSourceAttributeListAttributeCallback::CHIPPowerSourceAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralCommissioningAttributeListAttributeCallback::CHIPGeneralCommissioningAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8731,7 +8538,7 @@ CHIPPowerSourceAttributeListAttributeCallback::CHIPPowerSourceAttributeListAttri } } -CHIPPowerSourceAttributeListAttributeCallback::~CHIPPowerSourceAttributeListAttributeCallback() +CHIPGeneralCommissioningAttributeListAttributeCallback::~CHIPGeneralCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8742,8 +8549,8 @@ CHIPPowerSourceAttributeListAttributeCallback::~CHIPPowerSourceAttributeListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8752,8 +8559,8 @@ void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8784,10 +8591,9 @@ void CHIPPowerSourceAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CHIPGeneralCommissioningGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPNetworkCommissioningNetworksAttributeCallback::CHIPNetworkCommissioningNetworksAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8803,7 +8609,7 @@ CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CHIPGeneralCommis } } -CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::~CHIPGeneralCommissioningGeneratedCommandListAttributeCallback() +CHIPNetworkCommissioningNetworksAttributeCallback::~CHIPNetworkCommissioningNetworksAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8814,8 +8620,10 @@ CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::~CHIPGeneralCommi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8824,8 +8632,8 @@ void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8844,11 +8652,88 @@ void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_networkID; + jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast(entry_0.networkID.size())); + env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast(entry_0.networkID.size()), + reinterpret_cast(entry_0.networkID.data())); + newElement_0_networkID = newElement_0_networkIDByteArray; + jobject newElement_0_connected; + std::string newElement_0_connectedClassName = "java/lang/Boolean"; + std::string newElement_0_connectedCtorSignature = "(Z)V"; + jboolean jninewElement_0_connected = static_cast(entry_0.connected); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), + newElement_0_connectedCtorSignature.c_str(), + jninewElement_0_connected, newElement_0_connected); + jobject newElement_0_networkIdentifier; + if (!entry_0.networkIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); + } + else + { + jobject newElement_0_networkIdentifierInsideOptional; + if (entry_0.networkIdentifier.Value().IsNull()) + { + newElement_0_networkIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.networkIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); + newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, + newElement_0_networkIdentifier); + } + jobject newElement_0_clientIdentifier; + if (!entry_0.clientIdentifier.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); + } + else + { + jobject newElement_0_clientIdentifierInsideOptional; + if (entry_0.clientIdentifier.Value().IsNull()) + { + newElement_0_clientIdentifierInsideOptional = nullptr; + } + else + { + jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); + env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, + static_cast(entry_0.clientIdentifier.Value().Value().size()), + reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); + newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, + newElement_0_clientIdentifier); + } + + jclass networkInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", networkInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); + return; + } + + jmethodID networkInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, networkInfoStructStructClass_1, "", + "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", + &networkInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, + newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -8856,9 +8741,9 @@ void CHIPGeneralCommissioningGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CHIPGeneralCommissioningAcceptedCommandListAttributeCallback( +CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -8875,7 +8760,7 @@ CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CHIPGeneralCommiss } } -CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::~CHIPGeneralCommissioningAcceptedCommandListAttributeCallback() +CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::~CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8886,8 +8771,9 @@ CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::~CHIPGeneralCommis env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8895,9 +8781,8 @@ void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8905,32 +8790,30 @@ void CHIPGeneralCommissioningAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPGeneralCommissioningEventListAttributeCallback::CHIPGeneralCommissioningEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CHIPNetworkCommissioningLastNetworkIDAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8946,7 +8829,7 @@ CHIPGeneralCommissioningEventListAttributeCallback::CHIPGeneralCommissioningEven } } -CHIPGeneralCommissioningEventListAttributeCallback::~CHIPGeneralCommissioningEventListAttributeCallback() +CHIPNetworkCommissioningLastNetworkIDAttributeCallback::~CHIPNetworkCommissioningLastNetworkIDAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -8957,8 +8840,8 @@ CHIPGeneralCommissioningEventListAttributeCallback::~CHIPGeneralCommissioningEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -8966,9 +8849,8 @@ void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -8976,32 +8858,28 @@ void CHIPGeneralCommissioningEventListAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPGeneralCommissioningAttributeListAttributeCallback::CHIPGeneralCommissioningAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9018,7 +8896,7 @@ CHIPGeneralCommissioningAttributeListAttributeCallback::CHIPGeneralCommissioning } } -CHIPGeneralCommissioningAttributeListAttributeCallback::~CHIPGeneralCommissioningAttributeListAttributeCallback() +CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::~CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9029,8 +8907,8 @@ CHIPGeneralCommissioningAttributeListAttributeCallback::~CHIPGeneralCommissionin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9038,9 +8916,8 @@ void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9048,32 +8925,30 @@ void CHIPGeneralCommissioningAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPNetworkCommissioningNetworksAttributeCallback::CHIPNetworkCommissioningNetworksAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9089,7 +8964,7 @@ CHIPNetworkCommissioningNetworksAttributeCallback::CHIPNetworkCommissioningNetwo } } -CHIPNetworkCommissioningNetworksAttributeCallback::~CHIPNetworkCommissioningNetworksAttributeCallback() +CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::~CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9100,10 +8975,8 @@ CHIPNetworkCommissioningNetworksAttributeCallback::~CHIPNetworkCommissioningNetw env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> & list) +void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9112,8 +8985,8 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9132,88 +9005,11 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_networkID; - jbyteArray newElement_0_networkIDByteArray = env->NewByteArray(static_cast(entry_0.networkID.size())); - env->SetByteArrayRegion(newElement_0_networkIDByteArray, 0, static_cast(entry_0.networkID.size()), - reinterpret_cast(entry_0.networkID.data())); - newElement_0_networkID = newElement_0_networkIDByteArray; - jobject newElement_0_connected; - std::string newElement_0_connectedClassName = "java/lang/Boolean"; - std::string newElement_0_connectedCtorSignature = "(Z)V"; - jboolean jninewElement_0_connected = static_cast(entry_0.connected); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_connectedClassName.c_str(), - newElement_0_connectedCtorSignature.c_str(), - jninewElement_0_connected, newElement_0_connected); - jobject newElement_0_networkIdentifier; - if (!entry_0.networkIdentifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_networkIdentifier); - } - else - { - jobject newElement_0_networkIdentifierInsideOptional; - if (entry_0.networkIdentifier.Value().IsNull()) - { - newElement_0_networkIdentifierInsideOptional = nullptr; - } - else - { - jbyteArray newElement_0_networkIdentifierInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_0.networkIdentifier.Value().Value().size())); - env->SetByteArrayRegion(newElement_0_networkIdentifierInsideOptionalByteArray, 0, - static_cast(entry_0.networkIdentifier.Value().Value().size()), - reinterpret_cast(entry_0.networkIdentifier.Value().Value().data())); - newElement_0_networkIdentifierInsideOptional = newElement_0_networkIdentifierInsideOptionalByteArray; - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_networkIdentifierInsideOptional, - newElement_0_networkIdentifier); - } - jobject newElement_0_clientIdentifier; - if (!entry_0.clientIdentifier.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientIdentifier); - } - else - { - jobject newElement_0_clientIdentifierInsideOptional; - if (entry_0.clientIdentifier.Value().IsNull()) - { - newElement_0_clientIdentifierInsideOptional = nullptr; - } - else - { - jbyteArray newElement_0_clientIdentifierInsideOptionalByteArray = - env->NewByteArray(static_cast(entry_0.clientIdentifier.Value().Value().size())); - env->SetByteArrayRegion(newElement_0_clientIdentifierInsideOptionalByteArray, 0, - static_cast(entry_0.clientIdentifier.Value().Value().size()), - reinterpret_cast(entry_0.clientIdentifier.Value().Value().data())); - newElement_0_clientIdentifierInsideOptional = newElement_0_clientIdentifierInsideOptionalByteArray; - } - chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientIdentifierInsideOptional, - newElement_0_clientIdentifier); - } - - jclass networkInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", networkInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); - return; - } - - jmethodID networkInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, networkInfoStructStructClass_1, "", - "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", - &networkInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); - return; - } - - newElement_0 = env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, - newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9221,9 +9017,9 @@ void CHIPNetworkCommissioningNetworksAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback( +CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CHIPNetworkCommissioningGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9240,7 +9036,7 @@ CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CHIPNetworkCommis } } -CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::~CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback() +CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::~CHIPNetworkCommissioningGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9251,9 +9047,8 @@ CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::~CHIPNetworkCommi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::Nullable & value) +void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9261,8 +9056,9 @@ void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9270,29 +9066,32 @@ void CHIPNetworkCommissioningLastNetworkingStatusAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CHIPNetworkCommissioningLastNetworkIDAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CHIPNetworkCommissioningAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9309,7 +9108,7 @@ CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CHIPNetworkCommissioning } } -CHIPNetworkCommissioningLastNetworkIDAttributeCallback::~CHIPNetworkCommissioningLastNetworkIDAttributeCallback() +CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::~CHIPNetworkCommissioningAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9320,8 +9119,8 @@ CHIPNetworkCommissioningLastNetworkIDAttributeCallback::~CHIPNetworkCommissionin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9329,8 +9128,9 @@ void CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9338,29 +9138,32 @@ void CHIPNetworkCommissioningLastNetworkIDAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPNetworkCommissioningEventListAttributeCallback::CHIPNetworkCommissioningEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9376,7 +9179,7 @@ CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CHIPNetworkCommi } } -CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::~CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback() +CHIPNetworkCommissioningEventListAttributeCallback::~CHIPNetworkCommissioningEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9387,8 +9190,8 @@ CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::~CHIPNetworkComm env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9396,8 +9199,9 @@ void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9405,29 +9209,32 @@ void CHIPNetworkCommissioningLastConnectErrorValueAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPNetworkCommissioningAttributeListAttributeCallback::CHIPNetworkCommissioningAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9444,7 +9251,7 @@ CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CHIPNetworkCommissi } } -CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::~CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback() +CHIPNetworkCommissioningAttributeListAttributeCallback::~CHIPNetworkCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9455,8 +9262,8 @@ CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::~CHIPNetworkCommiss env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9465,8 +9272,8 @@ void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9485,11 +9292,11 @@ void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9497,9 +9304,9 @@ void CHIPNetworkCommissioningSupportedWiFiBandsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CHIPNetworkCommissioningGeneratedCommandListAttributeCallback( +CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CHIPDiagnosticLogsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9516,7 +9323,7 @@ CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CHIPNetworkCommis } } -CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::~CHIPNetworkCommissioningGeneratedCommandListAttributeCallback() +CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::~CHIPDiagnosticLogsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9527,7 +9334,7 @@ CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::~CHIPNetworkCommi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -9537,8 +9344,8 @@ void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9569,9 +9376,9 @@ void CHIPNetworkCommissioningGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CHIPNetworkCommissioningAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CHIPDiagnosticLogsAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9588,7 +9395,7 @@ CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CHIPNetworkCommiss } } -CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::~CHIPNetworkCommissioningAcceptedCommandListAttributeCallback() +CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::~CHIPDiagnosticLogsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9599,7 +9406,7 @@ CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::~CHIPNetworkCommis env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -9609,8 +9416,8 @@ void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9641,9 +9448,8 @@ void CHIPNetworkCommissioningAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningEventListAttributeCallback::CHIPNetworkCommissioningEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDiagnosticLogsEventListAttributeCallback::CHIPDiagnosticLogsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9659,7 +9465,7 @@ CHIPNetworkCommissioningEventListAttributeCallback::CHIPNetworkCommissioningEven } } -CHIPNetworkCommissioningEventListAttributeCallback::~CHIPNetworkCommissioningEventListAttributeCallback() +CHIPDiagnosticLogsEventListAttributeCallback::~CHIPDiagnosticLogsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9670,8 +9476,8 @@ CHIPNetworkCommissioningEventListAttributeCallback::~CHIPNetworkCommissioningEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9680,8 +9486,8 @@ void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9712,10 +9518,9 @@ void CHIPNetworkCommissioningEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPNetworkCommissioningAttributeListAttributeCallback::CHIPNetworkCommissioningAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDiagnosticLogsAttributeListAttributeCallback::CHIPDiagnosticLogsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9731,7 +9536,7 @@ CHIPNetworkCommissioningAttributeListAttributeCallback::CHIPNetworkCommissioning } } -CHIPNetworkCommissioningAttributeListAttributeCallback::~CHIPNetworkCommissioningAttributeListAttributeCallback() +CHIPDiagnosticLogsAttributeListAttributeCallback::~CHIPDiagnosticLogsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9742,7 +9547,7 @@ CHIPNetworkCommissioningAttributeListAttributeCallback::~CHIPNetworkCommissionin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( +void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -9752,8 +9557,8 @@ void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9784,9 +9589,9 @@ void CHIPNetworkCommissioningAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CHIPDiagnosticLogsGeneratedCommandListAttributeCallback( +CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9803,7 +9608,7 @@ CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CHIPDiagnosticLogsGener } } -CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::~CHIPDiagnosticLogsGeneratedCommandListAttributeCallback() +CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9814,8 +9619,10 @@ CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::~CHIPDiagnosticLogsGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9824,8 +9631,8 @@ void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9844,11 +9651,112 @@ void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); + jobject newElement_0_isOperational; + std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; + std::string newElement_0_isOperationalCtorSignature = "(Z)V"; + jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), + newElement_0_isOperationalCtorSignature.c_str(), + jninewElement_0_isOperational, newElement_0_isOperational); + jobject newElement_0_offPremiseServicesReachableIPv4; + if (entry_0.offPremiseServicesReachableIPv4.IsNull()) + { + newElement_0_offPremiseServicesReachableIPv4 = nullptr; + } + else + { + std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; + std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; + jboolean jninewElement_0_offPremiseServicesReachableIPv4 = + static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), + newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv4, + newElement_0_offPremiseServicesReachableIPv4); + } + jobject newElement_0_offPremiseServicesReachableIPv6; + if (entry_0.offPremiseServicesReachableIPv6.IsNull()) + { + newElement_0_offPremiseServicesReachableIPv6 = nullptr; + } + else + { + std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; + std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; + jboolean jninewElement_0_offPremiseServicesReachableIPv6 = + static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), + newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv6, + newElement_0_offPremiseServicesReachableIPv6); + } + jobject newElement_0_hardwareAddress; + jbyteArray newElement_0_hardwareAddressByteArray = env->NewByteArray(static_cast(entry_0.hardwareAddress.size())); + env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, static_cast(entry_0.hardwareAddress.size()), + reinterpret_cast(entry_0.hardwareAddress.data())); + newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; + jobject newElement_0_IPv4Addresses; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv4Addresses); + + auto iter_newElement_0_IPv4Addresses_2 = entry_0.IPv4Addresses.begin(); + while (iter_newElement_0_IPv4Addresses_2.Next()) + { + auto & entry_2 = iter_newElement_0_IPv4Addresses_2.GetValue(); + jobject newElement_2; + jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); + env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), + reinterpret_cast(entry_2.data())); + newElement_2 = newElement_2ByteArray; + chip::JniReferences::GetInstance().AddToList(newElement_0_IPv4Addresses, newElement_2); + } + jobject newElement_0_IPv6Addresses; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv6Addresses); + + auto iter_newElement_0_IPv6Addresses_2 = entry_0.IPv6Addresses.begin(); + while (iter_newElement_0_IPv6Addresses_2.Next()) + { + auto & entry_2 = iter_newElement_0_IPv6Addresses_2.GetValue(); + jobject newElement_2; + jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); + env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), + reinterpret_cast(entry_2.data())); + newElement_2 = newElement_2ByteArray; + chip::JniReferences::GetInstance().AddToList(newElement_0_IPv6Addresses, newElement_2); + } + jobject newElement_0_type; + std::string newElement_0_typeClassName = "java/lang/Integer"; + std::string newElement_0_typeCtorSignature = "(I)V"; + jint jninewElement_0_type = static_cast(entry_0.type); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); + + jclass networkInterfaceStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", networkInterfaceStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); + return; + } + + jmethodID networkInterfaceStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, networkInterfaceStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/util/" + "ArrayList;Ljava/lang/Integer;)V", + &networkInterfaceStructCtor_1); + if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); + return; + } + + newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, + newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, + newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, + newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9856,9 +9764,9 @@ void CHIPDiagnosticLogsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CHIPDiagnosticLogsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -9875,7 +9783,7 @@ CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CHIPDiagnosticLogsAccept } } -CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::~CHIPDiagnosticLogsAcceptedCommandListAttributeCallback() +CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9886,8 +9794,8 @@ CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::~CHIPDiagnosticLogsAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9896,8 +9804,8 @@ void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9916,11 +9824,11 @@ void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9928,8 +9836,10 @@ void CHIPDiagnosticLogsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDiagnosticLogsEventListAttributeCallback::CHIPDiagnosticLogsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9945,7 +9855,7 @@ CHIPDiagnosticLogsEventListAttributeCallback::CHIPDiagnosticLogsEventListAttribu } } -CHIPDiagnosticLogsEventListAttributeCallback::~CHIPDiagnosticLogsEventListAttributeCallback() +CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -9956,8 +9866,8 @@ CHIPDiagnosticLogsEventListAttributeCallback::~CHIPDiagnosticLogsEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -9966,8 +9876,8 @@ void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -9986,11 +9896,11 @@ void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -9998,9 +9908,10 @@ void CHIPDiagnosticLogsEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDiagnosticLogsAttributeListAttributeCallback::CHIPDiagnosticLogsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10016,7 +9927,7 @@ CHIPDiagnosticLogsAttributeListAttributeCallback::CHIPDiagnosticLogsAttributeLis } } -CHIPDiagnosticLogsAttributeListAttributeCallback::~CHIPDiagnosticLogsAttributeListAttributeCallback() +CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10027,8 +9938,8 @@ CHIPDiagnosticLogsAttributeListAttributeCallback::~CHIPDiagnosticLogsAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10037,8 +9948,8 @@ void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10057,11 +9968,11 @@ void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10069,9 +9980,9 @@ void CHIPDiagnosticLogsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback( +CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10088,7 +9999,7 @@ CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CHIPGeneralDiagnostics } } -CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback() +CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::~CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10099,10 +10010,8 @@ CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::~CHIPGeneralDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10111,8 +10020,8 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10131,112 +10040,11 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jobject newElement_0_isOperational; - std::string newElement_0_isOperationalClassName = "java/lang/Boolean"; - std::string newElement_0_isOperationalCtorSignature = "(Z)V"; - jboolean jninewElement_0_isOperational = static_cast(entry_0.isOperational); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isOperationalClassName.c_str(), - newElement_0_isOperationalCtorSignature.c_str(), - jninewElement_0_isOperational, newElement_0_isOperational); - jobject newElement_0_offPremiseServicesReachableIPv4; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) - { - newElement_0_offPremiseServicesReachableIPv4 = nullptr; - } - else - { - std::string newElement_0_offPremiseServicesReachableIPv4ClassName = "java/lang/Boolean"; - std::string newElement_0_offPremiseServicesReachableIPv4CtorSignature = "(Z)V"; - jboolean jninewElement_0_offPremiseServicesReachableIPv4 = - static_cast(entry_0.offPremiseServicesReachableIPv4.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offPremiseServicesReachableIPv4ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv4CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv4, - newElement_0_offPremiseServicesReachableIPv4); - } - jobject newElement_0_offPremiseServicesReachableIPv6; - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) - { - newElement_0_offPremiseServicesReachableIPv6 = nullptr; - } - else - { - std::string newElement_0_offPremiseServicesReachableIPv6ClassName = "java/lang/Boolean"; - std::string newElement_0_offPremiseServicesReachableIPv6CtorSignature = "(Z)V"; - jboolean jninewElement_0_offPremiseServicesReachableIPv6 = - static_cast(entry_0.offPremiseServicesReachableIPv6.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_offPremiseServicesReachableIPv6ClassName.c_str(), - newElement_0_offPremiseServicesReachableIPv6CtorSignature.c_str(), jninewElement_0_offPremiseServicesReachableIPv6, - newElement_0_offPremiseServicesReachableIPv6); - } - jobject newElement_0_hardwareAddress; - jbyteArray newElement_0_hardwareAddressByteArray = env->NewByteArray(static_cast(entry_0.hardwareAddress.size())); - env->SetByteArrayRegion(newElement_0_hardwareAddressByteArray, 0, static_cast(entry_0.hardwareAddress.size()), - reinterpret_cast(entry_0.hardwareAddress.data())); - newElement_0_hardwareAddress = newElement_0_hardwareAddressByteArray; - jobject newElement_0_IPv4Addresses; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv4Addresses); - - auto iter_newElement_0_IPv4Addresses_2 = entry_0.IPv4Addresses.begin(); - while (iter_newElement_0_IPv4Addresses_2.Next()) - { - auto & entry_2 = iter_newElement_0_IPv4Addresses_2.GetValue(); - jobject newElement_2; - jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); - env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), - reinterpret_cast(entry_2.data())); - newElement_2 = newElement_2ByteArray; - chip::JniReferences::GetInstance().AddToList(newElement_0_IPv4Addresses, newElement_2); - } - jobject newElement_0_IPv6Addresses; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_IPv6Addresses); - - auto iter_newElement_0_IPv6Addresses_2 = entry_0.IPv6Addresses.begin(); - while (iter_newElement_0_IPv6Addresses_2.Next()) - { - auto & entry_2 = iter_newElement_0_IPv6Addresses_2.GetValue(); - jobject newElement_2; - jbyteArray newElement_2ByteArray = env->NewByteArray(static_cast(entry_2.size())); - env->SetByteArrayRegion(newElement_2ByteArray, 0, static_cast(entry_2.size()), - reinterpret_cast(entry_2.data())); - newElement_2 = newElement_2ByteArray; - chip::JniReferences::GetInstance().AddToList(newElement_0_IPv6Addresses, newElement_2); - } - jobject newElement_0_type; - std::string newElement_0_typeClassName = "java/lang/Integer"; - std::string newElement_0_typeCtorSignature = "(I)V"; - jint jninewElement_0_type = static_cast(entry_0.type); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_typeClassName.c_str(), newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - - jclass networkInterfaceStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", networkInterfaceStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); - return; - } - - jmethodID networkInterfaceStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, networkInterfaceStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/util/" - "ArrayList;Ljava/lang/Integer;)V", - &networkInterfaceStructCtor_1); - if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); - return; - } - - newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, - newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, - newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, - newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10244,9 +10052,9 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback( +CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10263,7 +10071,7 @@ CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CHIPGeneralDiagnost } } -CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback() +CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::~CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10274,8 +10082,8 @@ CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::~CHIPGeneralDiagnos env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10284,8 +10092,8 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10304,11 +10112,11 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10316,10 +10124,9 @@ void CHIPGeneralDiagnosticsActiveHardwareFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPGeneralDiagnosticsEventListAttributeCallback::CHIPGeneralDiagnosticsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10335,7 +10142,7 @@ CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CHIPGeneralDiagnostics } } -CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback() +CHIPGeneralDiagnosticsEventListAttributeCallback::~CHIPGeneralDiagnosticsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10346,8 +10153,8 @@ CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::~CHIPGeneralDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10356,8 +10163,8 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10376,11 +10183,11 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10388,9 +10195,9 @@ void CHIPGeneralDiagnosticsActiveRadioFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGeneralDiagnosticsAttributeListAttributeCallback::CHIPGeneralDiagnosticsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10407,7 +10214,7 @@ CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CHIPGeneralDiagnosti } } -CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback() +CHIPGeneralDiagnosticsAttributeListAttributeCallback::~CHIPGeneralDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10418,8 +10225,8 @@ CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::~CHIPGeneralDiagnost env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10428,8 +10235,8 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10448,11 +10255,11 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -10460,9 +10267,9 @@ void CHIPGeneralDiagnosticsActiveNetworkFaultsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10479,7 +10286,7 @@ CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CHIPGeneralDiagnost } } -CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::~CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback() +CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10490,8 +10297,10 @@ CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::~CHIPGeneralDiagnos env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10500,8 +10309,8 @@ void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10520,40 +10329,130 @@ void CHIPGeneralDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); + jobject newElement_0_id; + std::string newElement_0_idClassName = "java/lang/Long"; + std::string newElement_0_idCtorSignature = "(J)V"; + jlong jninewElement_0_id = static_cast(entry_0.id); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::~CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + jobject newElement_0_stackFreeCurrent; + if (!entry_0.stackFreeCurrent.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeCurrent); + } + else + { + jobject newElement_0_stackFreeCurrentInsideOptional; + std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), + newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeCurrentInsideOptional, + newElement_0_stackFreeCurrentInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, + newElement_0_stackFreeCurrent); + } + jobject newElement_0_stackFreeMinimum; + if (!entry_0.stackFreeMinimum.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeMinimum); + } + else + { + jobject newElement_0_stackFreeMinimumInsideOptional; + std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), + newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeMinimumInsideOptional, + newElement_0_stackFreeMinimumInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, + newElement_0_stackFreeMinimum); + } + jobject newElement_0_stackSize; + if (!entry_0.stackSize.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackSize); + } + else + { + jobject newElement_0_stackSizeInsideOptional; + std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; + std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_stackSizeInsideOptionalClassName.c_str(), newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), + jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); + } + + jclass threadMetricsStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", + threadMetricsStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); + return; + } + + jmethodID threadMetricsStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, threadMetricsStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &threadMetricsStructStructCtor_1); + if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); + return; + } + + newElement_0 = + env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, newElement_0_name, + newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, newElement_0_stackSize); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) { ChipLogError(Zcl, "Could not delete global reference for Java callback"); @@ -10562,7 +10461,7 @@ CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::~CHIPGeneralDiagnost env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -10572,8 +10471,8 @@ void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10604,9 +10503,10 @@ void CHIPGeneralDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsEventListAttributeCallback::CHIPGeneralDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10622,7 +10522,7 @@ CHIPGeneralDiagnosticsEventListAttributeCallback::CHIPGeneralDiagnosticsEventLis } } -CHIPGeneralDiagnosticsEventListAttributeCallback::~CHIPGeneralDiagnosticsEventListAttributeCallback() +CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10633,8 +10533,8 @@ CHIPGeneralDiagnosticsEventListAttributeCallback::~CHIPGeneralDiagnosticsEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10643,8 +10543,8 @@ void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10675,10 +10575,9 @@ void CHIPGeneralDiagnosticsEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGeneralDiagnosticsAttributeListAttributeCallback::CHIPGeneralDiagnosticsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSoftwareDiagnosticsEventListAttributeCallback::CHIPSoftwareDiagnosticsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10694,7 +10593,7 @@ CHIPGeneralDiagnosticsAttributeListAttributeCallback::CHIPGeneralDiagnosticsAttr } } -CHIPGeneralDiagnosticsAttributeListAttributeCallback::~CHIPGeneralDiagnosticsAttributeListAttributeCallback() +CHIPSoftwareDiagnosticsEventListAttributeCallback::~CHIPSoftwareDiagnosticsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10705,8 +10604,8 @@ CHIPGeneralDiagnosticsAttributeListAttributeCallback::~CHIPGeneralDiagnosticsAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10715,8 +10614,8 @@ void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10747,9 +10646,9 @@ void CHIPGeneralDiagnosticsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, +CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CHIPSoftwareDiagnosticsAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10766,7 +10665,7 @@ CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsTh } } -CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback() +CHIPSoftwareDiagnosticsAttributeListAttributeCallback::~CHIPSoftwareDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10777,10 +10676,8 @@ CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::~CHIPSoftwareDiagnosticsT env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & list) +void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10789,8 +10686,8 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10809,111 +10706,21 @@ void CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_id; - std::string newElement_0_idClassName = "java/lang/Long"; - std::string newElement_0_idCtorSignature = "(J)V"; - jlong jninewElement_0_id = static_cast(entry_0.id); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - jobject newElement_0_stackFreeCurrent; - if (!entry_0.stackFreeCurrent.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeCurrent); - } - else - { - jobject newElement_0_stackFreeCurrentInsideOptional; - std::string newElement_0_stackFreeCurrentInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackFreeCurrentInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackFreeCurrentInsideOptional = static_cast(entry_0.stackFreeCurrent.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackFreeCurrentInsideOptionalClassName.c_str(), - newElement_0_stackFreeCurrentInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeCurrentInsideOptional, - newElement_0_stackFreeCurrentInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeCurrentInsideOptional, - newElement_0_stackFreeCurrent); - } - jobject newElement_0_stackFreeMinimum; - if (!entry_0.stackFreeMinimum.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackFreeMinimum); - } - else - { - jobject newElement_0_stackFreeMinimumInsideOptional; - std::string newElement_0_stackFreeMinimumInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackFreeMinimumInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackFreeMinimumInsideOptional = static_cast(entry_0.stackFreeMinimum.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackFreeMinimumInsideOptionalClassName.c_str(), - newElement_0_stackFreeMinimumInsideOptionalCtorSignature.c_str(), jninewElement_0_stackFreeMinimumInsideOptional, - newElement_0_stackFreeMinimumInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackFreeMinimumInsideOptional, - newElement_0_stackFreeMinimum); - } - jobject newElement_0_stackSize; - if (!entry_0.stackSize.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_stackSize); - } - else - { - jobject newElement_0_stackSizeInsideOptional; - std::string newElement_0_stackSizeInsideOptionalClassName = "java/lang/Long"; - std::string newElement_0_stackSizeInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_0_stackSizeInsideOptional = static_cast(entry_0.stackSize.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_stackSizeInsideOptionalClassName.c_str(), newElement_0_stackSizeInsideOptionalCtorSignature.c_str(), - jninewElement_0_stackSizeInsideOptional, newElement_0_stackSizeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); - } - - jclass threadMetricsStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", - threadMetricsStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); - return; - } - - jmethodID threadMetricsStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, threadMetricsStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &threadMetricsStructStructCtor_1); - if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); - return; - } - - newElement_0 = - env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, newElement_0_name, - newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, newElement_0_stackSize); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CHIPThreadNetworkDiagnosticsChannelAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -10930,7 +10737,7 @@ CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CHIPSoftwareDiagno } } -CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback() +CHIPThreadNetworkDiagnosticsChannelAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -10941,8 +10748,8 @@ CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::~CHIPSoftwareDiagn env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -10950,9 +10757,8 @@ void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -10960,32 +10766,29 @@ void CHIPSoftwareDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback( +CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11002,7 +10805,7 @@ CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CHIPSoftwareDiagnos } } -CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::~CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback() +CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::~CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11013,8 +10816,8 @@ CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::~CHIPSoftwareDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11022,9 +10825,8 @@ void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11032,32 +10834,30 @@ void CHIPSoftwareDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPSoftwareDiagnosticsEventListAttributeCallback::CHIPSoftwareDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11073,7 +10873,7 @@ CHIPSoftwareDiagnosticsEventListAttributeCallback::CHIPSoftwareDiagnosticsEventL } } -CHIPSoftwareDiagnosticsEventListAttributeCallback::~CHIPSoftwareDiagnosticsEventListAttributeCallback() +CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::~CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11084,8 +10884,8 @@ CHIPSoftwareDiagnosticsEventListAttributeCallback::~CHIPSoftwareDiagnosticsEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11093,9 +10893,8 @@ void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11103,33 +10902,25 @@ void CHIPSoftwareDiagnosticsEventListAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CHIPSoftwareDiagnosticsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsPanIdAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11145,7 +10936,7 @@ CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CHIPSoftwareDiagnosticsAt } } -CHIPSoftwareDiagnosticsAttributeListAttributeCallback::~CHIPSoftwareDiagnosticsAttributeListAttributeCallback() +CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPanIdAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11156,8 +10947,8 @@ CHIPSoftwareDiagnosticsAttributeListAttributeCallback::~CHIPSoftwareDiagnosticsA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11165,9 +10956,8 @@ void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11175,32 +10965,29 @@ void CHIPSoftwareDiagnosticsAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CHIPThreadNetworkDiagnosticsChannelAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11217,7 +11004,7 @@ CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CHIPThreadNetworkDiagnosti } } -CHIPThreadNetworkDiagnosticsChannelAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelAttributeCallback() +CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11228,8 +11015,8 @@ CHIPThreadNetworkDiagnosticsChannelAttributeCallback::~CHIPThreadNetworkDiagnost env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11237,8 +11024,8 @@ void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11246,7 +11033,7 @@ void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -11256,19 +11043,19 @@ void CHIPThreadNetworkDiagnosticsChannelAttributeCallback::CallbackFn(void * con } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback( +CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11285,7 +11072,7 @@ CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CHIPThreadNetworkDiagn } } -CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::~CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback() +CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::~CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11296,8 +11083,8 @@ CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::~CHIPThreadNetworkDiag env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11305,8 +11092,8 @@ void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11314,7 +11101,7 @@ void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -11324,19 +11111,459 @@ void CHIPThreadNetworkDiagnosticsRoutingRoleAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback( +CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::~CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_extAddress; + std::string newElement_0_extAddressClassName = "java/lang/Long"; + std::string newElement_0_extAddressCtorSignature = "(J)V"; + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); + jobject newElement_0_age; + std::string newElement_0_ageClassName = "java/lang/Long"; + std::string newElement_0_ageCtorSignature = "(J)V"; + jlong jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); + jobject newElement_0_rloc16; + std::string newElement_0_rloc16ClassName = "java/lang/Integer"; + std::string newElement_0_rloc16CtorSignature = "(I)V"; + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, + newElement_0_rloc16); + jobject newElement_0_linkFrameCounter; + std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; + std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; + jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), + jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); + jobject newElement_0_mleFrameCounter; + std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; + std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; + jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), + newElement_0_mleFrameCounterCtorSignature.c_str(), + jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); + jobject newElement_0_lqi; + std::string newElement_0_lqiClassName = "java/lang/Integer"; + std::string newElement_0_lqiCtorSignature = "(I)V"; + jint jninewElement_0_lqi = static_cast(entry_0.lqi); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), jninewElement_0_lqi, newElement_0_lqi); + jobject newElement_0_averageRssi; + if (entry_0.averageRssi.IsNull()) + { + newElement_0_averageRssi = nullptr; + } + else + { + std::string newElement_0_averageRssiClassName = "java/lang/Integer"; + std::string newElement_0_averageRssiCtorSignature = "(I)V"; + jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), + newElement_0_averageRssiCtorSignature.c_str(), + jninewElement_0_averageRssi, newElement_0_averageRssi); + } + jobject newElement_0_lastRssi; + if (entry_0.lastRssi.IsNull()) + { + newElement_0_lastRssi = nullptr; + } + else + { + std::string newElement_0_lastRssiClassName = "java/lang/Integer"; + std::string newElement_0_lastRssiCtorSignature = "(I)V"; + jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), + newElement_0_lastRssiCtorSignature.c_str(), + jninewElement_0_lastRssi, newElement_0_lastRssi); + } + jobject newElement_0_frameErrorRate; + std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; + std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; + jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), + newElement_0_frameErrorRateCtorSignature.c_str(), + jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); + jobject newElement_0_messageErrorRate; + std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; + std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; + jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), + newElement_0_messageErrorRateCtorSignature.c_str(), + jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); + jobject newElement_0_rxOnWhenIdle; + std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; + std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; + jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), + newElement_0_rxOnWhenIdleCtorSignature.c_str(), + jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); + jobject newElement_0_fullThreadDevice; + std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; + std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; + jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), + jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); + jobject newElement_0_fullNetworkData; + std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; + std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; + jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), + jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); + jobject newElement_0_isChild; + std::string newElement_0_isChildClassName = "java/lang/Boolean"; + std::string newElement_0_isChildCtorSignature = "(Z)V"; + jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), + newElement_0_isChildCtorSignature.c_str(), + jninewElement_0_isChild, newElement_0_isChild); + + jclass neighborTableStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", + neighborTableStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); + return; + } + + jmethodID neighborTableStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, neighborTableStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;)V", + &neighborTableStructStructCtor_1); + if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); + return; + } + + newElement_0 = env->NewObject( + neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, + newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, + newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, + newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::~CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_extAddress; + std::string newElement_0_extAddressClassName = "java/lang/Long"; + std::string newElement_0_extAddressCtorSignature = "(J)V"; + jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), + newElement_0_extAddressCtorSignature.c_str(), + jninewElement_0_extAddress, newElement_0_extAddress); + jobject newElement_0_rloc16; + std::string newElement_0_rloc16ClassName = "java/lang/Integer"; + std::string newElement_0_rloc16CtorSignature = "(I)V"; + jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), + newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, + newElement_0_rloc16); + jobject newElement_0_routerId; + std::string newElement_0_routerIdClassName = "java/lang/Integer"; + std::string newElement_0_routerIdCtorSignature = "(I)V"; + jint jninewElement_0_routerId = static_cast(entry_0.routerId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), + newElement_0_routerIdCtorSignature.c_str(), + jninewElement_0_routerId, newElement_0_routerId); + jobject newElement_0_nextHop; + std::string newElement_0_nextHopClassName = "java/lang/Integer"; + std::string newElement_0_nextHopCtorSignature = "(I)V"; + jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), + newElement_0_nextHopCtorSignature.c_str(), + jninewElement_0_nextHop, newElement_0_nextHop); + jobject newElement_0_pathCost; + std::string newElement_0_pathCostClassName = "java/lang/Integer"; + std::string newElement_0_pathCostCtorSignature = "(I)V"; + jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), + newElement_0_pathCostCtorSignature.c_str(), + jninewElement_0_pathCost, newElement_0_pathCost); + jobject newElement_0_LQIIn; + std::string newElement_0_LQIInClassName = "java/lang/Integer"; + std::string newElement_0_LQIInCtorSignature = "(I)V"; + jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), + newElement_0_LQIInCtorSignature.c_str(), jninewElement_0_LQIIn, + newElement_0_LQIIn); + jobject newElement_0_LQIOut; + std::string newElement_0_LQIOutClassName = "java/lang/Integer"; + std::string newElement_0_LQIOutCtorSignature = "(I)V"; + jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), + newElement_0_LQIOutCtorSignature.c_str(), jninewElement_0_LQIOut, + newElement_0_LQIOut); + jobject newElement_0_age; + std::string newElement_0_ageClassName = "java/lang/Integer"; + std::string newElement_0_ageCtorSignature = "(I)V"; + jint jninewElement_0_age = static_cast(entry_0.age); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); + jobject newElement_0_allocated; + std::string newElement_0_allocatedClassName = "java/lang/Boolean"; + std::string newElement_0_allocatedCtorSignature = "(Z)V"; + jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), + newElement_0_allocatedCtorSignature.c_str(), + jninewElement_0_allocated, newElement_0_allocated); + jobject newElement_0_linkEstablished; + std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; + std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; + jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), + jninewElement_0_linkEstablished, newElement_0_linkEstablished); + + jclass routeTableStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", + routeTableStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); + return; + } + + jmethodID routeTableStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, routeTableStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", + &routeTableStructStructCtor_1); + if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); + return; + } + + newElement_0 = env->NewObject(routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, + newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, newElement_0_pathCost, + newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, newElement_0_allocated, + newElement_0_linkEstablished); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CHIPThreadNetworkDiagnosticsWeightingAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11353,7 +11580,7 @@ CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CHIPThreadNetworkDiagn } } -CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::~CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback() +CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::~CHIPThreadNetworkDiagnosticsWeightingAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11364,8 +11591,8 @@ CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::~CHIPThreadNetworkDiag env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11373,8 +11600,8 @@ void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11382,7 +11609,7 @@ void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -11392,15 +11619,20 @@ void CHIPThreadNetworkDiagnosticsNetworkNameAttributeCallback::CallbackFn( } else { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsPanIdAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11416,7 +11648,7 @@ CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CHIPThreadNetworkDiagnostics } } -CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPanIdAttributeCallback() +CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11427,8 +11659,8 @@ CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::~CHIPThreadNetworkDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11436,8 +11668,8 @@ void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11465,9 +11697,9 @@ void CHIPThreadNetworkDiagnosticsPanIdAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback( +CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11484,7 +11716,7 @@ CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CHIPThreadNetworkDia } } -CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::~CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback() +CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11495,8 +11727,8 @@ CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::~CHIPThreadNetworkDi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11504,8 +11736,8 @@ void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11513,7 +11745,7 @@ void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -11523,19 +11755,19 @@ void CHIPThreadNetworkDiagnosticsExtendedPanIdAttributeCallback::CallbackFn(void } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback( +CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11552,7 +11784,7 @@ CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CHIPThreadNetworkD } } -CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::~CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback() +CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::~CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11563,8 +11795,8 @@ CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::~CHIPThreadNetwork env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11572,8 +11804,8 @@ void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11581,7 +11813,7 @@ void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -11591,18 +11823,19 @@ void CHIPThreadNetworkDiagnosticsMeshLocalPrefixAttributeCallback::CallbackFn( } else { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback( +CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11619,7 +11852,7 @@ CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CHIPThreadNetworkDia } } -CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::~CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback() +CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11630,187 +11863,47 @@ CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::~CHIPThreadNetworkDi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsNeighborTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> & list) +void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_extAddress; - std::string newElement_0_extAddressClassName = "java/lang/Long"; - std::string newElement_0_extAddressCtorSignature = "(J)V"; - jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - jninewElement_0_extAddress, newElement_0_extAddress); - jobject newElement_0_age; - std::string newElement_0_ageClassName = "java/lang/Long"; - std::string newElement_0_ageCtorSignature = "(J)V"; - jlong jninewElement_0_age = static_cast(entry_0.age); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); - jobject newElement_0_rloc16; - std::string newElement_0_rloc16ClassName = "java/lang/Integer"; - std::string newElement_0_rloc16CtorSignature = "(I)V"; - jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, - newElement_0_rloc16); - jobject newElement_0_linkFrameCounter; - std::string newElement_0_linkFrameCounterClassName = "java/lang/Long"; - std::string newElement_0_linkFrameCounterCtorSignature = "(J)V"; - jlong jninewElement_0_linkFrameCounter = static_cast(entry_0.linkFrameCounter); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_linkFrameCounterClassName.c_str(), newElement_0_linkFrameCounterCtorSignature.c_str(), - jninewElement_0_linkFrameCounter, newElement_0_linkFrameCounter); - jobject newElement_0_mleFrameCounter; - std::string newElement_0_mleFrameCounterClassName = "java/lang/Long"; - std::string newElement_0_mleFrameCounterCtorSignature = "(J)V"; - jlong jninewElement_0_mleFrameCounter = static_cast(entry_0.mleFrameCounter); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_mleFrameCounterClassName.c_str(), - newElement_0_mleFrameCounterCtorSignature.c_str(), - jninewElement_0_mleFrameCounter, newElement_0_mleFrameCounter); - jobject newElement_0_lqi; - std::string newElement_0_lqiClassName = "java/lang/Integer"; - std::string newElement_0_lqiCtorSignature = "(I)V"; - jint jninewElement_0_lqi = static_cast(entry_0.lqi); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_lqiClassName.c_str(), newElement_0_lqiCtorSignature.c_str(), jninewElement_0_lqi, newElement_0_lqi); - jobject newElement_0_averageRssi; - if (entry_0.averageRssi.IsNull()) - { - newElement_0_averageRssi = nullptr; - } - else - { - std::string newElement_0_averageRssiClassName = "java/lang/Integer"; - std::string newElement_0_averageRssiCtorSignature = "(I)V"; - jint jninewElement_0_averageRssi = static_cast(entry_0.averageRssi.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_averageRssiClassName.c_str(), - newElement_0_averageRssiCtorSignature.c_str(), - jninewElement_0_averageRssi, newElement_0_averageRssi); - } - jobject newElement_0_lastRssi; - if (entry_0.lastRssi.IsNull()) - { - newElement_0_lastRssi = nullptr; - } - else - { - std::string newElement_0_lastRssiClassName = "java/lang/Integer"; - std::string newElement_0_lastRssiCtorSignature = "(I)V"; - jint jninewElement_0_lastRssi = static_cast(entry_0.lastRssi.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_lastRssiClassName.c_str(), - newElement_0_lastRssiCtorSignature.c_str(), - jninewElement_0_lastRssi, newElement_0_lastRssi); - } - jobject newElement_0_frameErrorRate; - std::string newElement_0_frameErrorRateClassName = "java/lang/Integer"; - std::string newElement_0_frameErrorRateCtorSignature = "(I)V"; - jint jninewElement_0_frameErrorRate = static_cast(entry_0.frameErrorRate); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameErrorRateClassName.c_str(), - newElement_0_frameErrorRateCtorSignature.c_str(), - jninewElement_0_frameErrorRate, newElement_0_frameErrorRate); - jobject newElement_0_messageErrorRate; - std::string newElement_0_messageErrorRateClassName = "java/lang/Integer"; - std::string newElement_0_messageErrorRateCtorSignature = "(I)V"; - jint jninewElement_0_messageErrorRate = static_cast(entry_0.messageErrorRate); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_messageErrorRateClassName.c_str(), - newElement_0_messageErrorRateCtorSignature.c_str(), - jninewElement_0_messageErrorRate, newElement_0_messageErrorRate); - jobject newElement_0_rxOnWhenIdle; - std::string newElement_0_rxOnWhenIdleClassName = "java/lang/Boolean"; - std::string newElement_0_rxOnWhenIdleCtorSignature = "(Z)V"; - jboolean jninewElement_0_rxOnWhenIdle = static_cast(entry_0.rxOnWhenIdle); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rxOnWhenIdleClassName.c_str(), - newElement_0_rxOnWhenIdleCtorSignature.c_str(), - jninewElement_0_rxOnWhenIdle, newElement_0_rxOnWhenIdle); - jobject newElement_0_fullThreadDevice; - std::string newElement_0_fullThreadDeviceClassName = "java/lang/Boolean"; - std::string newElement_0_fullThreadDeviceCtorSignature = "(Z)V"; - jboolean jninewElement_0_fullThreadDevice = static_cast(entry_0.fullThreadDevice); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fullThreadDeviceClassName.c_str(), newElement_0_fullThreadDeviceCtorSignature.c_str(), - jninewElement_0_fullThreadDevice, newElement_0_fullThreadDevice); - jobject newElement_0_fullNetworkData; - std::string newElement_0_fullNetworkDataClassName = "java/lang/Boolean"; - std::string newElement_0_fullNetworkDataCtorSignature = "(Z)V"; - jboolean jninewElement_0_fullNetworkData = static_cast(entry_0.fullNetworkData); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_fullNetworkDataClassName.c_str(), newElement_0_fullNetworkDataCtorSignature.c_str(), - jninewElement_0_fullNetworkData, newElement_0_fullNetworkData); - jobject newElement_0_isChild; - std::string newElement_0_isChildClassName = "java/lang/Boolean"; - std::string newElement_0_isChildCtorSignature = "(Z)V"; - jboolean jninewElement_0_isChild = static_cast(entry_0.isChild); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_isChildClassName.c_str(), - newElement_0_isChildCtorSignature.c_str(), - jninewElement_0_isChild, newElement_0_isChild); - - jclass neighborTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", - neighborTableStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); - return; - } - - jmethodID neighborTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, neighborTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;)V", - &neighborTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); - return; - } + jobject javaCallbackRef; - newElement_0 = env->NewObject( - neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, - newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, - newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, - newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback( +CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -11827,7 +11920,7 @@ CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CHIPThreadNetworkDiagno } } -CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::~CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback() +CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11838,10 +11931,8 @@ CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::~CHIPThreadNetworkDiagn env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> & list) +void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -11849,9 +11940,8 @@ void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -11859,124 +11949,29 @@ void CHIPThreadNetworkDiagnosticsRouteTableAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_extAddress; - std::string newElement_0_extAddressClassName = "java/lang/Long"; - std::string newElement_0_extAddressCtorSignature = "(J)V"; - jlong jninewElement_0_extAddress = static_cast(entry_0.extAddress); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_extAddressClassName.c_str(), - newElement_0_extAddressCtorSignature.c_str(), - jninewElement_0_extAddress, newElement_0_extAddress); - jobject newElement_0_rloc16; - std::string newElement_0_rloc16ClassName = "java/lang/Integer"; - std::string newElement_0_rloc16CtorSignature = "(I)V"; - jint jninewElement_0_rloc16 = static_cast(entry_0.rloc16); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_rloc16ClassName.c_str(), - newElement_0_rloc16CtorSignature.c_str(), jninewElement_0_rloc16, - newElement_0_rloc16); - jobject newElement_0_routerId; - std::string newElement_0_routerIdClassName = "java/lang/Integer"; - std::string newElement_0_routerIdCtorSignature = "(I)V"; - jint jninewElement_0_routerId = static_cast(entry_0.routerId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_routerIdClassName.c_str(), - newElement_0_routerIdCtorSignature.c_str(), - jninewElement_0_routerId, newElement_0_routerId); - jobject newElement_0_nextHop; - std::string newElement_0_nextHopClassName = "java/lang/Integer"; - std::string newElement_0_nextHopCtorSignature = "(I)V"; - jint jninewElement_0_nextHop = static_cast(entry_0.nextHop); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nextHopClassName.c_str(), - newElement_0_nextHopCtorSignature.c_str(), - jninewElement_0_nextHop, newElement_0_nextHop); - jobject newElement_0_pathCost; - std::string newElement_0_pathCostClassName = "java/lang/Integer"; - std::string newElement_0_pathCostCtorSignature = "(I)V"; - jint jninewElement_0_pathCost = static_cast(entry_0.pathCost); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_pathCostClassName.c_str(), - newElement_0_pathCostCtorSignature.c_str(), - jninewElement_0_pathCost, newElement_0_pathCost); - jobject newElement_0_LQIIn; - std::string newElement_0_LQIInClassName = "java/lang/Integer"; - std::string newElement_0_LQIInCtorSignature = "(I)V"; - jint jninewElement_0_LQIIn = static_cast(entry_0.LQIIn); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIInClassName.c_str(), - newElement_0_LQIInCtorSignature.c_str(), jninewElement_0_LQIIn, - newElement_0_LQIIn); - jobject newElement_0_LQIOut; - std::string newElement_0_LQIOutClassName = "java/lang/Integer"; - std::string newElement_0_LQIOutCtorSignature = "(I)V"; - jint jninewElement_0_LQIOut = static_cast(entry_0.LQIOut); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_LQIOutClassName.c_str(), - newElement_0_LQIOutCtorSignature.c_str(), jninewElement_0_LQIOut, - newElement_0_LQIOut); - jobject newElement_0_age; - std::string newElement_0_ageClassName = "java/lang/Integer"; - std::string newElement_0_ageCtorSignature = "(I)V"; - jint jninewElement_0_age = static_cast(entry_0.age); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_ageClassName.c_str(), newElement_0_ageCtorSignature.c_str(), jninewElement_0_age, newElement_0_age); - jobject newElement_0_allocated; - std::string newElement_0_allocatedClassName = "java/lang/Boolean"; - std::string newElement_0_allocatedCtorSignature = "(Z)V"; - jboolean jninewElement_0_allocated = static_cast(entry_0.allocated); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_allocatedClassName.c_str(), - newElement_0_allocatedCtorSignature.c_str(), - jninewElement_0_allocated, newElement_0_allocated); - jobject newElement_0_linkEstablished; - std::string newElement_0_linkEstablishedClassName = "java/lang/Boolean"; - std::string newElement_0_linkEstablishedCtorSignature = "(Z)V"; - jboolean jninewElement_0_linkEstablished = static_cast(entry_0.linkEstablished); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), - jninewElement_0_linkEstablished, newElement_0_linkEstablished); - - jclass routeTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", - routeTableStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); - return; - } - - jmethodID routeTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, routeTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" - "lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", - &routeTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); - return; - } - - newElement_0 = env->NewObject(routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, - newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, newElement_0_pathCost, - newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, newElement_0_allocated, - newElement_0_linkEstablished); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CHIPThreadNetworkDiagnosticsDelayAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -11992,7 +11987,7 @@ CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CHIPThreadNetworkDiagn } } -CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::~CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback() +CHIPThreadNetworkDiagnosticsDelayAttributeCallback::~CHIPThreadNetworkDiagnosticsDelayAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12003,8 +11998,8 @@ CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::~CHIPThreadNetworkDiag env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12012,8 +12007,8 @@ void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12041,9 +12036,9 @@ void CHIPThreadNetworkDiagnosticsPartitionIdAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CHIPThreadNetworkDiagnosticsWeightingAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12060,7 +12055,7 @@ CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CHIPThreadNetworkDiagnos } } -CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::~CHIPThreadNetworkDiagnosticsWeightingAttributeCallback() +CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12071,8 +12066,8 @@ CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::~CHIPThreadNetworkDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12080,8 +12075,8 @@ void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12089,7 +12084,7 @@ void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -12099,19 +12094,18 @@ void CHIPThreadNetworkDiagnosticsWeightingAttributeCallback::CallbackFn(void * c } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: + CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12128,7 +12122,8 @@ CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CHIPThreadNetworkDiagn } } -CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback() +CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: + ~CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12139,8 +12134,9 @@ CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::~CHIPThreadNetworkDiag env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12148,8 +12144,9 @@ void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12157,29 +12154,32 @@ void CHIPThreadNetworkDiagnosticsDataVersionAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: + CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12196,7 +12196,8 @@ CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CHIPThreadNetwor } } -CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::~CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback() +CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: + ~CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12207,8 +12208,8 @@ CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::~CHIPThreadNetwo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12216,8 +12217,9 @@ void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12225,29 +12227,32 @@ void CHIPThreadNetworkDiagnosticsStableDataVersionAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback( +CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12264,7 +12269,8 @@ CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CHIPThreadNetworkDi } } -CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::~CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback() +CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback:: + ~CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12275,8 +12281,8 @@ CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::~CHIPThreadNetworkD env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12284,8 +12290,9 @@ void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12293,29 +12300,32 @@ void CHIPThreadNetworkDiagnosticsLeaderRouterIdAttributeCallback::CallbackFn(voi ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CHIPThreadNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12332,7 +12342,7 @@ CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CHIPThreadNetworkD } } -CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback() +CHIPThreadNetworkDiagnosticsEventListAttributeCallback::~CHIPThreadNetworkDiagnosticsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12343,8 +12353,8 @@ CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::~CHIPThreadNetwork env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12352,8 +12362,9 @@ void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12361,29 +12372,32 @@ void CHIPThreadNetworkDiagnosticsActiveTimestampAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback( +CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12400,7 +12414,7 @@ CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CHIPThreadNetwork } } -CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::~CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback() +CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::~CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12411,8 +12425,8 @@ CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::~CHIPThreadNetwor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12420,8 +12434,9 @@ void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12429,29 +12444,32 @@ void CHIPThreadNetworkDiagnosticsPendingTimestampAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CHIPThreadNetworkDiagnosticsDelayAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CHIPWiFiNetworkDiagnosticsBssidAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12467,7 +12485,7 @@ CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CHIPThreadNetworkDiagnostics } } -CHIPThreadNetworkDiagnosticsDelayAttributeCallback::~CHIPThreadNetworkDiagnosticsDelayAttributeCallback() +CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::~CHIPWiFiNetworkDiagnosticsBssidAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12478,8 +12496,8 @@ CHIPThreadNetworkDiagnosticsDelayAttributeCallback::~CHIPThreadNetworkDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12487,8 +12505,8 @@ void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12496,7 +12514,7 @@ void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -12506,19 +12524,18 @@ void CHIPThreadNetworkDiagnosticsDelayAttributeCallback::CallbackFn(void * conte } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); + env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), + reinterpret_cast(value.Value().data())); + javaValue = javaValueByteArray; } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback( +CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12535,7 +12552,7 @@ CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CHIPThreadNetwork } } -CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::~CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback() +CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::~CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12546,8 +12563,8 @@ CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::~CHIPThreadNetwor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12555,8 +12572,8 @@ void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12564,7 +12581,7 @@ void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -12574,18 +12591,19 @@ void CHIPThreadNetworkDiagnosticsChannelPage0MaskAttributeCallback::CallbackFn( } else { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12602,8 +12620,7 @@ CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: } } -CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback() +CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::~CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12614,9 +12631,8 @@ CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12624,9 +12640,8 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12634,32 +12649,29 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12676,8 +12688,7 @@ CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: } } -CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback() +CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::~CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12688,8 +12699,8 @@ CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12697,9 +12708,8 @@ void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12707,33 +12717,29 @@ void CHIPThreadNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CHIPWiFiNetworkDiagnosticsRssiAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12749,8 +12755,7 @@ CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPThreadNetw } } -CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - ~CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback() +CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::~CHIPWiFiNetworkDiagnosticsRssiAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12761,8 +12766,8 @@ CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12770,9 +12775,8 @@ void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackF jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12780,32 +12784,29 @@ void CHIPThreadNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackF ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CHIPThreadNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12822,7 +12823,7 @@ CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CHIPThreadNetworkDiagnos } } -CHIPThreadNetworkDiagnosticsEventListAttributeCallback::~CHIPThreadNetworkDiagnosticsEventListAttributeCallback() +CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12833,8 +12834,8 @@ CHIPThreadNetworkDiagnosticsEventListAttributeCallback::~CHIPThreadNetworkDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12842,9 +12843,8 @@ void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12852,32 +12852,29 @@ void CHIPThreadNetworkDiagnosticsEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback( +CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -12894,7 +12891,7 @@ CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CHIPThreadNetworkDia } } -CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::~CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback() +CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12905,8 +12902,8 @@ CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::~CHIPThreadNetworkDi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12914,9 +12911,8 @@ void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12924,32 +12920,30 @@ void CHIPThreadNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CHIPWiFiNetworkDiagnosticsBssidAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: + CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12965,7 +12959,8 @@ CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CHIPWiFiNetworkDiagnosticsBssi } } -CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::~CHIPWiFiNetworkDiagnosticsBssidAttributeCallback() +CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: + ~CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -12976,8 +12971,8 @@ CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::~CHIPWiFiNetworkDiagnosticsBss env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12985,8 +12980,8 @@ void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -12994,7 +12989,7 @@ void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "([B)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13004,18 +12999,19 @@ void CHIPWiFiNetworkDiagnosticsBssidAttributeCallback::CallbackFn(void * context } else { - jbyteArray javaValueByteArray = env->NewByteArray(static_cast(value.Value().size())); - env->SetByteArrayRegion(javaValueByteArray, 0, static_cast(value.Value().size()), - reinterpret_cast(value.Value().data())); - javaValue = javaValueByteArray; + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: + CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13032,7 +13028,8 @@ CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CHIPWiFiNetworkDiagnost } } -CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::~CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback() +CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: + ~CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13043,8 +13040,8 @@ CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::~CHIPWiFiNetworkDiagnos env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13052,8 +13049,8 @@ void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13061,7 +13058,7 @@ void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13071,19 +13068,19 @@ void CHIPWiFiNetworkDiagnosticsSecurityTypeAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13100,7 +13097,7 @@ CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CHIPWiFiNetworkDiagnosti } } -CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::~CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback() +CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13111,8 +13108,8 @@ CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::~CHIPWiFiNetworkDiagnost env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13120,8 +13117,8 @@ void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13129,7 +13126,7 @@ void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13139,19 +13136,19 @@ void CHIPWiFiNetworkDiagnosticsWiFiVersionAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback( +CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13168,7 +13165,7 @@ CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CHIPWiFiNetworkDiagnos } } -CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::~CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback() +CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13179,8 +13176,8 @@ CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::~CHIPWiFiNetworkDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13188,8 +13185,8 @@ void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13197,7 +13194,7 @@ void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13207,19 +13204,20 @@ void CHIPWiFiNetworkDiagnosticsChannelNumberAttributeCallback::CallbackFn(void * } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CHIPWiFiNetworkDiagnosticsRssiAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13235,7 +13233,7 @@ CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CHIPWiFiNetworkDiagnosticsRssiA } } -CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::~CHIPWiFiNetworkDiagnosticsRssiAttributeCallback() +CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::~CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13246,8 +13244,8 @@ CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::~CHIPWiFiNetworkDiagnosticsRssi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13255,8 +13253,8 @@ void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13264,7 +13262,7 @@ void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13274,19 +13272,19 @@ void CHIPWiFiNetworkDiagnosticsRssiAttributeCallback::CallbackFn(void * context, } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback( +CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13303,7 +13301,7 @@ CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CHIPWiFiNetworkDiagn } } -CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback() +CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13314,8 +13312,8 @@ CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::~CHIPWiFiNetworkDiag env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13323,8 +13321,8 @@ void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13352,9 +13350,9 @@ void CHIPWiFiNetworkDiagnosticsBeaconLostCountAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback( +CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13371,7 +13369,7 @@ CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CHIPWiFiNetworkDiagnos } } -CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback() +CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13382,8 +13380,8 @@ CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::~CHIPWiFiNetworkDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13391,8 +13389,9 @@ void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13400,29 +13399,32 @@ void CHIPWiFiNetworkDiagnosticsBeaconRxCountAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: - CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13439,8 +13441,7 @@ CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: } } -CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: - ~CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback() +CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13451,8 +13452,8 @@ CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13460,8 +13461,9 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13469,29 +13471,32 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastRxCountAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: - CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CHIPWiFiNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13508,8 +13513,7 @@ CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: } } -CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: - ~CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback() +CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::~CHIPWiFiNetworkDiagnosticsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13520,8 +13524,8 @@ CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13529,8 +13533,9 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::Callback jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13538,29 +13543,32 @@ void CHIPWiFiNetworkDiagnosticsPacketMulticastTxCountAttributeCallback::Callback ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback( +CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13577,7 +13585,7 @@ CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CHIPWiFiNetwork } } -CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback() +CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13588,8 +13596,8 @@ CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::~CHIPWiFiNetwor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13597,8 +13605,9 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13606,29 +13615,32 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastRxCountAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13645,7 +13657,7 @@ CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CHIPWiFiNetwork } } -CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback() +CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::~CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13656,8 +13668,8 @@ CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::~CHIPWiFiNetwor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13665,8 +13677,8 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13674,7 +13686,7 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13684,19 +13696,19 @@ void CHIPWiFiNetworkDiagnosticsPacketUnicastTxCountAttributeCallback::CallbackFn } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback( +CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13713,7 +13725,7 @@ CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CHIPWiFiNetworkDiagno } } -CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::~CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback() +CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::~CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13724,8 +13736,8 @@ CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::~CHIPWiFiNetworkDiagn env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13733,8 +13745,8 @@ void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13742,7 +13754,7 @@ void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13752,19 +13764,19 @@ void CHIPWiFiNetworkDiagnosticsCurrentMaxRateAttributeCallback::CallbackFn(void } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + jboolean jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback( +CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13781,7 +13793,7 @@ CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CHIPWiFiNetworkDiagnost } } -CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::~CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback() +CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::~CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13792,8 +13804,8 @@ CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::~CHIPWiFiNetworkDiagnos env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -13801,8 +13813,8 @@ void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13810,7 +13822,7 @@ void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -13820,19 +13832,19 @@ void CHIPWiFiNetworkDiagnosticsOverrunCountAttributeCallback::CallbackFn(void * } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Boolean"; + std::string javaValueCtorSignature = "(Z)V"; + jboolean jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: + CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13849,7 +13861,8 @@ CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CHIPWiFiNetwork } } -CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback() +CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: + ~CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13860,7 +13873,7 @@ CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::~CHIPWiFiNetwor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -13870,8 +13883,8 @@ void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13902,9 +13915,9 @@ void CHIPWiFiNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: + CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13921,7 +13934,8 @@ CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CHIPWiFiNetworkD } } -CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback() +CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: + ~CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -13932,7 +13946,7 @@ CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::~CHIPWiFiNetwork env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -13942,8 +13956,8 @@ void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -13974,9 +13988,9 @@ void CHIPWiFiNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CHIPWiFiNetworkDiagnosticsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CHIPEthernetNetworkDiagnosticsEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -13993,7 +14007,7 @@ CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CHIPWiFiNetworkDiagnostics } } -CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::~CHIPWiFiNetworkDiagnosticsEventListAttributeCallback() +CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::~CHIPEthernetNetworkDiagnosticsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14004,7 +14018,7 @@ CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::~CHIPWiFiNetworkDiagnostic env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( +void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -14014,8 +14028,8 @@ void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14046,9 +14060,9 @@ void CHIPWiFiNetworkDiagnosticsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback( +CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14065,7 +14079,7 @@ CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CHIPWiFiNetworkDiagnos } } -CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::~CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback() +CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::~CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14076,7 +14090,7 @@ CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::~CHIPWiFiNetworkDiagno env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( +void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -14086,8 +14100,8 @@ void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14105,91 +14119,22 @@ void CHIPWiFiNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( while (iter_arrayListObj_0.Next()) { auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::~CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPEthernetNetworkDiagnosticsPHYRateAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimeSynchronizationUTCTimeAttributeCallback::CHIPTimeSynchronizationUTCTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14205,7 +14150,7 @@ CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CHIPEthernetNetworkDi } } -CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::~CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback() +CHIPTimeSynchronizationUTCTimeAttributeCallback::~CHIPTimeSynchronizationUTCTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14216,8 +14161,8 @@ CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::~CHIPEthernetNetworkD env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14225,8 +14170,8 @@ void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14234,7 +14179,7 @@ void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -14244,20 +14189,19 @@ void CHIPEthernetNetworkDiagnosticsFullDuplexAttributeCallback::CallbackFn(void } else { - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - jboolean jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimeSynchronizationDefaultNTPAttributeCallback::CHIPTimeSynchronizationDefaultNTPAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14273,7 +14217,7 @@ CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CHIPEthernetNetwor } } -CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::~CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback() +CHIPTimeSynchronizationDefaultNTPAttributeCallback::~CHIPTimeSynchronizationDefaultNTPAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14284,8 +14228,8 @@ CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::~CHIPEthernetNetwo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14293,8 +14237,8 @@ void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(vo jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14302,7 +14246,7 @@ void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(vo ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Boolean;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -14312,20 +14256,15 @@ void CHIPEthernetNetworkDiagnosticsCarrierDetectAttributeCallback::CallbackFn(vo } else { - std::string javaValueClassName = "java/lang/Boolean"; - std::string javaValueCtorSignature = "(Z)V"; - jboolean jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimeSynchronizationTimeZoneAttributeCallback::CHIPTimeSynchronizationTimeZoneAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14341,8 +14280,7 @@ CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: } } -CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: - ~CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback() +CHIPTimeSynchronizationTimeZoneAttributeCallback::~CHIPTimeSynchronizationTimeZoneAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14353,8 +14291,10 @@ CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14363,8 +14303,8 @@ void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14383,11 +14323,54 @@ void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callba { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); + jobject newElement_0_validAt; + std::string newElement_0_validAtClassName = "java/lang/Long"; + std::string newElement_0_validAtCtorSignature = "(J)V"; + jlong jninewElement_0_validAt = static_cast(entry_0.validAt); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), + newElement_0_validAtCtorSignature.c_str(), + jninewElement_0_validAt, newElement_0_validAt); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + + jclass timeZoneStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); + return; + } + + jmethodID timeZoneStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", + &timeZoneStructStructCtor_1); + if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); + return; + } + + newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, + newElement_0_validAt, newElement_0_name); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14395,10 +14378,9 @@ void CHIPEthernetNetworkDiagnosticsGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimeSynchronizationDSTOffsetAttributeCallback::CHIPTimeSynchronizationDSTOffsetAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14414,8 +14396,7 @@ CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: } } -CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: - ~CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback() +CHIPTimeSynchronizationDSTOffsetAttributeCallback::~CHIPTimeSynchronizationDSTOffsetAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14426,8 +14407,10 @@ CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14436,8 +14419,8 @@ void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14456,11 +14439,56 @@ void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::Callbac { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_offset; + std::string newElement_0_offsetClassName = "java/lang/Long"; + std::string newElement_0_offsetCtorSignature = "(J)V"; + jlong jninewElement_0_offset = static_cast(entry_0.offset); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), + newElement_0_offsetCtorSignature.c_str(), + jninewElement_0_offset, newElement_0_offset); + jobject newElement_0_validStarting; + std::string newElement_0_validStartingClassName = "java/lang/Long"; + std::string newElement_0_validStartingCtorSignature = "(J)V"; + jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), + newElement_0_validStartingCtorSignature.c_str(), + jninewElement_0_validStarting, newElement_0_validStarting); + jobject newElement_0_validUntil; + if (entry_0.validUntil.IsNull()) + { + newElement_0_validUntil = nullptr; + } + else + { + std::string newElement_0_validUntilClassName = "java/lang/Long"; + std::string newElement_0_validUntilCtorSignature = "(J)V"; + jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), + newElement_0_validUntilCtorSignature.c_str(), + jninewElement_0_validUntil, newElement_0_validUntil); + } + + jclass DSTOffsetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", DSTOffsetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); + return; + } + + jmethodID DSTOffsetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", + &DSTOffsetStructStructCtor_1); + if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); + return; + } + + newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, + newElement_0_validStarting, newElement_0_validUntil); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14468,10 +14496,9 @@ void CHIPEthernetNetworkDiagnosticsAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CHIPEthernetNetworkDiagnosticsEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimeSynchronizationLocalTimeAttributeCallback::CHIPTimeSynchronizationLocalTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14487,7 +14514,7 @@ CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CHIPEthernetNetworkDia } } -CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::~CHIPEthernetNetworkDiagnosticsEventListAttributeCallback() +CHIPTimeSynchronizationLocalTimeAttributeCallback::~CHIPTimeSynchronizationLocalTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14498,8 +14525,8 @@ CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::~CHIPEthernetNetworkDi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14507,9 +14534,8 @@ void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14517,32 +14543,29 @@ void CHIPEthernetNetworkDiagnosticsEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback( +CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CHIPTimeSynchronizationGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -14559,7 +14582,7 @@ CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CHIPEthernetNetwor } } -CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::~CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback() +CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::~CHIPTimeSynchronizationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14570,8 +14593,8 @@ CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::~CHIPEthernetNetwo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14580,8 +14603,8 @@ void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14612,9 +14635,10 @@ void CHIPEthernetNetworkDiagnosticsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationUTCTimeAttributeCallback::CHIPTimeSynchronizationUTCTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CHIPTimeSynchronizationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14630,7 +14654,7 @@ CHIPTimeSynchronizationUTCTimeAttributeCallback::CHIPTimeSynchronizationUTCTimeA } } -CHIPTimeSynchronizationUTCTimeAttributeCallback::~CHIPTimeSynchronizationUTCTimeAttributeCallback() +CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::~CHIPTimeSynchronizationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14641,8 +14665,8 @@ CHIPTimeSynchronizationUTCTimeAttributeCallback::~CHIPTimeSynchronizationUTCTime env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14650,8 +14674,9 @@ void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14659,29 +14684,32 @@ void CHIPTimeSynchronizationUTCTimeAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationDefaultNTPAttributeCallback::CHIPTimeSynchronizationDefaultNTPAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimeSynchronizationEventListAttributeCallback::CHIPTimeSynchronizationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14697,7 +14725,7 @@ CHIPTimeSynchronizationDefaultNTPAttributeCallback::CHIPTimeSynchronizationDefau } } -CHIPTimeSynchronizationDefaultNTPAttributeCallback::~CHIPTimeSynchronizationDefaultNTPAttributeCallback() +CHIPTimeSynchronizationEventListAttributeCallback::~CHIPTimeSynchronizationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14708,8 +14736,8 @@ CHIPTimeSynchronizationDefaultNTPAttributeCallback::~CHIPTimeSynchronizationDefa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14717,8 +14745,9 @@ void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14726,25 +14755,33 @@ void CHIPTimeSynchronizationDefaultNTPAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/String;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(value.Value(), javaValue)); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationTimeZoneAttributeCallback::CHIPTimeSynchronizationTimeZoneAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimeSynchronizationAttributeListAttributeCallback::CHIPTimeSynchronizationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14760,7 +14797,7 @@ CHIPTimeSynchronizationTimeZoneAttributeCallback::CHIPTimeSynchronizationTimeZon } } -CHIPTimeSynchronizationTimeZoneAttributeCallback::~CHIPTimeSynchronizationTimeZoneAttributeCallback() +CHIPTimeSynchronizationAttributeListAttributeCallback::~CHIPTimeSynchronizationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14771,10 +14808,8 @@ CHIPTimeSynchronizationTimeZoneAttributeCallback::~CHIPTimeSynchronizationTimeZo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14783,8 +14818,8 @@ void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14803,54 +14838,11 @@ void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_offset; - std::string newElement_0_offsetClassName = "java/lang/Long"; - std::string newElement_0_offsetCtorSignature = "(J)V"; - jlong jninewElement_0_offset = static_cast(entry_0.offset); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - jninewElement_0_offset, newElement_0_offset); - jobject newElement_0_validAt; - std::string newElement_0_validAtClassName = "java/lang/Long"; - std::string newElement_0_validAtCtorSignature = "(J)V"; - jlong jninewElement_0_validAt = static_cast(entry_0.validAt); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validAtClassName.c_str(), - newElement_0_validAtCtorSignature.c_str(), - jninewElement_0_validAt, newElement_0_validAt); - jobject newElement_0_name; - if (!entry_0.name.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); - } - else - { - jobject newElement_0_nameInsideOptional; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value(), newElement_0_nameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); - } - - jclass timeZoneStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); - return; - } - - jmethodID timeZoneStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", - &timeZoneStructStructCtor_1); - if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); - return; - } - - newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, - newElement_0_validAt, newElement_0_name); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14858,9 +14850,10 @@ void CHIPTimeSynchronizationTimeZoneAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationDSTOffsetAttributeCallback::CHIPTimeSynchronizationDSTOffsetAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: + CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14876,7 +14869,8 @@ CHIPTimeSynchronizationDSTOffsetAttributeCallback::CHIPTimeSynchronizationDSTOff } } -CHIPTimeSynchronizationDSTOffsetAttributeCallback::~CHIPTimeSynchronizationDSTOffsetAttributeCallback() +CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: + ~CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14887,10 +14881,8 @@ CHIPTimeSynchronizationDSTOffsetAttributeCallback::~CHIPTimeSynchronizationDSTOf env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -14899,8 +14891,8 @@ void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -14919,56 +14911,11 @@ void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_offset; - std::string newElement_0_offsetClassName = "java/lang/Long"; - std::string newElement_0_offsetCtorSignature = "(J)V"; - jlong jninewElement_0_offset = static_cast(entry_0.offset); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_offsetClassName.c_str(), - newElement_0_offsetCtorSignature.c_str(), - jninewElement_0_offset, newElement_0_offset); - jobject newElement_0_validStarting; - std::string newElement_0_validStartingClassName = "java/lang/Long"; - std::string newElement_0_validStartingCtorSignature = "(J)V"; - jlong jninewElement_0_validStarting = static_cast(entry_0.validStarting); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validStartingClassName.c_str(), - newElement_0_validStartingCtorSignature.c_str(), - jninewElement_0_validStarting, newElement_0_validStarting); - jobject newElement_0_validUntil; - if (entry_0.validUntil.IsNull()) - { - newElement_0_validUntil = nullptr; - } - else - { - std::string newElement_0_validUntilClassName = "java/lang/Long"; - std::string newElement_0_validUntilCtorSignature = "(J)V"; - jlong jninewElement_0_validUntil = static_cast(entry_0.validUntil.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_validUntilClassName.c_str(), - newElement_0_validUntilCtorSignature.c_str(), - jninewElement_0_validUntil, newElement_0_validUntil); - } - - jclass DSTOffsetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", DSTOffsetStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); - return; - } - - jmethodID DSTOffsetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", - &DSTOffsetStructStructCtor_1); - if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); - return; - } - - newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, - newElement_0_validStarting, newElement_0_validUntil); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -14976,9 +14923,10 @@ void CHIPTimeSynchronizationDSTOffsetAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationLocalTimeAttributeCallback::CHIPTimeSynchronizationLocalTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: + CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -14994,7 +14942,8 @@ CHIPTimeSynchronizationLocalTimeAttributeCallback::CHIPTimeSynchronizationLocalT } } -CHIPTimeSynchronizationLocalTimeAttributeCallback::~CHIPTimeSynchronizationLocalTimeAttributeCallback() +CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: + ~CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15005,8 +14954,8 @@ CHIPTimeSynchronizationLocalTimeAttributeCallback::~CHIPTimeSynchronizationLocal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15014,8 +14963,9 @@ void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15023,29 +14973,32 @@ void CHIPTimeSynchronizationLocalTimeAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CHIPTimeSynchronizationGeneratedCommandListAttributeCallback( +CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBasicInformationEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15062,7 +15015,7 @@ CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CHIPTimeSynchroniz } } -CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::~CHIPTimeSynchronizationGeneratedCommandListAttributeCallback() +CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceBasicInformationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15073,8 +15026,8 @@ CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::~CHIPTimeSynchroni env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15083,8 +15036,8 @@ void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15115,9 +15068,9 @@ void CHIPTimeSynchronizationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CHIPTimeSynchronizationAcceptedCommandListAttributeCallback( +CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15134,7 +15087,7 @@ CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CHIPTimeSynchroniza } } -CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::~CHIPTimeSynchronizationAcceptedCommandListAttributeCallback() +CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15145,8 +15098,8 @@ CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::~CHIPTimeSynchroniz env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15155,8 +15108,8 @@ void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15187,9 +15140,9 @@ void CHIPTimeSynchronizationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationEventListAttributeCallback::CHIPTimeSynchronizationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15205,7 +15158,7 @@ CHIPTimeSynchronizationEventListAttributeCallback::CHIPTimeSynchronizationEventL } } -CHIPTimeSynchronizationEventListAttributeCallback::~CHIPTimeSynchronizationEventListAttributeCallback() +CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15216,8 +15169,8 @@ CHIPTimeSynchronizationEventListAttributeCallback::~CHIPTimeSynchronizationEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15226,8 +15179,8 @@ void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15258,10 +15211,9 @@ void CHIPTimeSynchronizationEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimeSynchronizationAttributeListAttributeCallback::CHIPTimeSynchronizationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15277,7 +15229,7 @@ CHIPTimeSynchronizationAttributeListAttributeCallback::CHIPTimeSynchronizationAt } } -CHIPTimeSynchronizationAttributeListAttributeCallback::~CHIPTimeSynchronizationAttributeListAttributeCallback() +CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15288,8 +15240,8 @@ CHIPTimeSynchronizationAttributeListAttributeCallback::~CHIPTimeSynchronizationA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15298,8 +15250,8 @@ void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15330,10 +15282,8 @@ void CHIPTimeSynchronizationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15349,8 +15299,7 @@ CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: } } -CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback() +CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15361,8 +15310,8 @@ CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15371,8 +15320,8 @@ void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::Cal VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15403,10 +15352,8 @@ void CHIPBridgedDeviceBasicInformationGeneratedCommandListAttributeCallback::Cal env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15422,8 +15369,7 @@ CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: } } -CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: - ~CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback() +CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15434,8 +15380,8 @@ CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15444,8 +15390,8 @@ void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::Call VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15476,9 +15422,9 @@ void CHIPBridgedDeviceBasicInformationAcceptedCommandListAttributeCallback::Call env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBasicInformationEventListAttributeCallback( +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15495,7 +15441,7 @@ CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CHIPBridgedDeviceBa } } -CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceBasicInformationEventListAttributeCallback() +CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15506,8 +15452,8 @@ CHIPBridgedDeviceBasicInformationEventListAttributeCallback::~CHIPBridgedDeviceB env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15515,9 +15461,8 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15525,32 +15470,29 @@ void CHIPBridgedDeviceBasicInformationEventListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback( +CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorCommissioningAdminVendorIdAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -15567,7 +15509,7 @@ CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CHIPBridgedDevi } } -CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback() +CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministratorCommissioningAdminVendorIdAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15578,8 +15520,8 @@ CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::~CHIPBridgedDev env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15587,9 +15529,8 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15597,32 +15538,30 @@ void CHIPBridgedDeviceBasicInformationAttributeListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: + CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15638,7 +15577,8 @@ CHIPSwitchGeneratedCommandListAttributeCallback::CHIPSwitchGeneratedCommandListA } } -CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandListAttributeCallback() +CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: + ~CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15649,8 +15589,8 @@ CHIPSwitchGeneratedCommandListAttributeCallback::~CHIPSwitchGeneratedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15659,8 +15599,8 @@ void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15691,9 +15631,10 @@ void CHIPSwitchGeneratedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: + CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15709,7 +15650,8 @@ CHIPSwitchAcceptedCommandListAttributeCallback::CHIPSwitchAcceptedCommandListAtt } } -CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAttributeCallback() +CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: + ~CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15720,8 +15662,8 @@ CHIPSwitchAcceptedCommandListAttributeCallback::~CHIPSwitchAcceptedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15730,8 +15672,8 @@ void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15762,8 +15704,10 @@ void CHIPSwitchAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommissioningEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15779,7 +15723,7 @@ CHIPSwitchEventListAttributeCallback::CHIPSwitchEventListAttributeCallback(jobje } } -CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() +CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorCommissioningEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15790,8 +15734,8 @@ CHIPSwitchEventListAttributeCallback::~CHIPSwitchEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15800,8 +15744,8 @@ void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15832,8 +15776,10 @@ void CHIPSwitchEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15849,7 +15795,7 @@ CHIPSwitchAttributeListAttributeCallback::CHIPSwitchAttributeListAttributeCallba } } -CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallback() +CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15860,8 +15806,8 @@ CHIPSwitchAttributeListAttributeCallback::~CHIPSwitchAttributeListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15870,8 +15816,8 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15902,10 +15848,9 @@ void CHIPSwitchAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15921,7 +15866,7 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CHIPAdministrat } } -CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback() +CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15932,8 +15877,10 @@ CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::~CHIPAdministra env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -15941,8 +15888,9 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -15950,30 +15898,72 @@ void CHIPAdministratorCommissioningAdminFabricIndexAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_noc; + jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); + env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), + reinterpret_cast(entry_0.noc.data())); + newElement_0_noc = newElement_0_nocByteArray; + jobject newElement_0_icac; + if (entry_0.icac.IsNull()) + { + newElement_0_icac = nullptr; + } + else + { + jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); + env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), + reinterpret_cast(entry_0.icac.Value().data())); + newElement_0_icac = newElement_0_icacByteArray; + } + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass NOCStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); + return; + } + + jmethodID NOCStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V", + &NOCStructStructCtor_1); + if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); + return; + } + + newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, + newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorCommissioningAdminVendorIdAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFabricsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -15989,7 +15979,7 @@ CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CHIPAdministratorC } } -CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministratorCommissioningAdminVendorIdAttributeCallback() +CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsFabricsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16000,8 +15990,10 @@ CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::~CHIPAdministrator env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16009,8 +16001,9 @@ void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16018,29 +16011,87 @@ void CHIPAdministratorCommissioningAdminVendorIdAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_rootPublicKey; + jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); + env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), + reinterpret_cast(entry_0.rootPublicKey.data())); + newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; + jobject newElement_0_vendorID; + std::string newElement_0_vendorIDClassName = "java/lang/Integer"; + std::string newElement_0_vendorIDCtorSignature = "(I)V"; + jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), + newElement_0_vendorIDCtorSignature.c_str(), + jninewElement_0_vendorID, newElement_0_vendorID); + jobject newElement_0_fabricID; + std::string newElement_0_fabricIDClassName = "java/lang/Long"; + std::string newElement_0_fabricIDCtorSignature = "(J)V"; + jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), + jninewElement_0_fabricID, newElement_0_fabricID); + jobject newElement_0_nodeID; + std::string newElement_0_nodeIDClassName = "java/lang/Long"; + std::string newElement_0_nodeIDCtorSignature = "(J)V"; + jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), + newElement_0_nodeIDCtorSignature.c_str(), + jninewElement_0_nodeID, newElement_0_nodeID); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass fabricDescriptorStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", + fabricDescriptorStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); + return; + } + + jmethodID fabricDescriptorStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, fabricDescriptorStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", + &fabricDescriptorStructStructCtor_1); + if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); + return; + } + + newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, + newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, + newElement_0_label, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16057,8 +16108,8 @@ CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: } } -CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback() +CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: + ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16069,8 +16120,8 @@ CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16079,8 +16130,8 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16099,11 +16150,10 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); + env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), + reinterpret_cast(entry_0.data())); + newElement_0 = newElement_0ByteArray; chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16111,9 +16161,9 @@ void CHIPAdministratorCommissioningGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16130,8 +16180,7 @@ CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: } } -CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: - ~CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback() +CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationalCredentialsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16142,7 +16191,7 @@ CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -16152,8 +16201,8 @@ void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16184,9 +16233,9 @@ void CHIPAdministratorCommissioningAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommissioningEventListAttributeCallback( +CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalCredentialsAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16203,7 +16252,7 @@ CHIPAdministratorCommissioningEventListAttributeCallback::CHIPAdministratorCommi } } -CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorCommissioningEventListAttributeCallback() +CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperationalCredentialsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16214,8 +16263,8 @@ CHIPAdministratorCommissioningEventListAttributeCallback::~CHIPAdministratorComm env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16224,8 +16273,8 @@ void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16256,9 +16305,9 @@ void CHIPAdministratorCommissioningEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorCommissioningAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentialsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16275,7 +16324,7 @@ CHIPAdministratorCommissioningAttributeListAttributeCallback::CHIPAdministratorC } } -CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministratorCommissioningAttributeListAttributeCallback() +CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredentialsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16286,8 +16335,8 @@ CHIPAdministratorCommissioningAttributeListAttributeCallback::~CHIPAdministrator env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16296,8 +16345,8 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16328,9 +16377,10 @@ void CHIPAdministratorCommissioningAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16346,7 +16396,7 @@ CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsA } } -CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() +CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16357,10 +16407,8 @@ CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCs env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16369,8 +16417,8 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16389,51 +16437,11 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_noc; - jbyteArray newElement_0_nocByteArray = env->NewByteArray(static_cast(entry_0.noc.size())); - env->SetByteArrayRegion(newElement_0_nocByteArray, 0, static_cast(entry_0.noc.size()), - reinterpret_cast(entry_0.noc.data())); - newElement_0_noc = newElement_0_nocByteArray; - jobject newElement_0_icac; - if (entry_0.icac.IsNull()) - { - newElement_0_icac = nullptr; - } - else - { - jbyteArray newElement_0_icacByteArray = env->NewByteArray(static_cast(entry_0.icac.Value().size())); - env->SetByteArrayRegion(newElement_0_icacByteArray, 0, static_cast(entry_0.icac.Value().size()), - reinterpret_cast(entry_0.icac.Value().data())); - newElement_0_icac = newElement_0_icacByteArray; - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass NOCStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); - return; - } - - jmethodID NOCStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", "([B[BLjava/lang/Integer;)V", - &NOCStructStructCtor_1); - if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); - return; - } - - newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, - newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16441,9 +16449,9 @@ void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFabricsAttributeCallback(jobject javaCallback, +CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupKeyMapAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16459,7 +16467,7 @@ CHIPOperationalCredentialsFabricsAttributeCallback::CHIPOperationalCredentialsFa } } -CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsFabricsAttributeCallback() +CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroupKeyMapAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16470,10 +16478,10 @@ CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsF env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( +void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16482,8 +16490,8 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16502,34 +16510,20 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_rootPublicKey; - jbyteArray newElement_0_rootPublicKeyByteArray = env->NewByteArray(static_cast(entry_0.rootPublicKey.size())); - env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), - reinterpret_cast(entry_0.rootPublicKey.data())); - newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; - jobject newElement_0_vendorID; - std::string newElement_0_vendorIDClassName = "java/lang/Integer"; - std::string newElement_0_vendorIDCtorSignature = "(I)V"; - jint jninewElement_0_vendorID = static_cast(entry_0.vendorID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_vendorIDClassName.c_str(), - newElement_0_vendorIDCtorSignature.c_str(), - jninewElement_0_vendorID, newElement_0_vendorID); - jobject newElement_0_fabricID; - std::string newElement_0_fabricIDClassName = "java/lang/Long"; - std::string newElement_0_fabricIDCtorSignature = "(J)V"; - jlong jninewElement_0_fabricID = static_cast(entry_0.fabricID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), - newElement_0_fabricIDCtorSignature.c_str(), - jninewElement_0_fabricID, newElement_0_fabricID); - jobject newElement_0_nodeID; - std::string newElement_0_nodeIDClassName = "java/lang/Long"; - std::string newElement_0_nodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_nodeID = static_cast(entry_0.nodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), - newElement_0_nodeIDCtorSignature.c_str(), - jninewElement_0_nodeID, newElement_0_nodeID); - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); + jobject newElement_0_groupKeySetID; + std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; + std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; + jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), + newElement_0_groupKeySetIDCtorSignature.c_str(), + jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); jobject newElement_0_fabricIndex; std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; std::string newElement_0_fabricIndexCtorSignature = "(I)V"; @@ -16538,30 +16532,27 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass fabricDescriptorStructStructClass_1; + jclass groupKeyMapStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", - fabricDescriptorStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); return; } - jmethodID fabricDescriptorStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, fabricDescriptorStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", - &fabricDescriptorStructStructCtor_1); - if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) + jmethodID groupKeyMapStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, groupKeyMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &groupKeyMapStructStructCtor_1); + if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); return; } - newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, - newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, - newElement_0_label, newElement_0_fabricIndex); + newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, + newElement_0_groupKeySetID, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16569,10 +16560,9 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTableAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16588,8 +16578,7 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: } } -CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: - ~CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback() +CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupTableAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16600,8 +16589,10 @@ CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16610,30 +16601,89 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_groupId; + std::string newElement_0_groupIdClassName = "java/lang/Integer"; + std::string newElement_0_groupIdCtorSignature = "(I)V"; + jint jninewElement_0_groupId = static_cast(entry_0.groupId); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), + newElement_0_groupIdCtorSignature.c_str(), + jninewElement_0_groupId, newElement_0_groupId); + jobject newElement_0_endpoints; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); + + auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); + while (iter_newElement_0_endpoints_2.Next()) + { + auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); + jobject newElement_2; + std::string newElement_2ClassName = "java/lang/Integer"; + std::string newElement_2CtorSignature = "(I)V"; + jint jninewElement_2 = static_cast(entry_2); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); + chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); + } + jobject newElement_0_groupName; + if (!entry_0.groupName.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); + } + else + { + jobject newElement_0_groupNameInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), + newElement_0_groupNameInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); + } + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass groupInfoMapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); + return; + } - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jmethodID groupInfoMapStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, groupInfoMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", &groupInfoMapStructStructCtor_1); + if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); + return; + } - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jbyteArray newElement_0ByteArray = env->NewByteArray(static_cast(entry_0.size())); - env->SetByteArrayRegion(newElement_0ByteArray, 0, static_cast(entry_0.size()), - reinterpret_cast(entry_0.data())); - newElement_0 = newElement_0ByteArray; + newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, + newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -16641,9 +16691,9 @@ void CHIPOperationalCredentialsTrustedRootCertificatesAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperationalCredentialsGeneratedCommandListAttributeCallback( +CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16660,7 +16710,7 @@ CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CHIPOperational } } -CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationalCredentialsGeneratedCommandListAttributeCallback() +CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManagementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16671,7 +16721,7 @@ CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::~CHIPOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -16681,8 +16731,8 @@ void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16713,9 +16763,9 @@ void CHIPOperationalCredentialsGeneratedCommandListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalCredentialsAcceptedCommandListAttributeCallback( +CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManagementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16732,7 +16782,7 @@ CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CHIPOperationalC } } -CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperationalCredentialsAcceptedCommandListAttributeCallback() +CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16743,7 +16793,7 @@ CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::~CHIPOperational env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -16753,8 +16803,8 @@ void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16785,10 +16835,9 @@ void CHIPOperationalCredentialsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentialsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16804,7 +16853,7 @@ CHIPOperationalCredentialsEventListAttributeCallback::CHIPOperationalCredentials } } -CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredentialsEventListAttributeCallback() +CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16815,8 +16864,8 @@ CHIPOperationalCredentialsEventListAttributeCallback::~CHIPOperationalCredential env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16825,8 +16874,8 @@ void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16857,9 +16906,9 @@ void CHIPOperationalCredentialsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredentialsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -16876,7 +16925,7 @@ CHIPOperationalCredentialsAttributeListAttributeCallback::CHIPOperationalCredent } } -CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCredentialsAttributeListAttributeCallback() +CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16887,7 +16936,7 @@ CHIPOperationalCredentialsAttributeListAttributeCallback::~CHIPOperationalCreden env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( +void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -16897,8 +16946,8 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16929,9 +16978,8 @@ void CHIPOperationalCredentialsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupKeyMapAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16947,7 +16995,7 @@ CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CHIPGroupKeyManagementGroupK } } -CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroupKeyMapAttributeCallback() +CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -16958,10 +17006,9 @@ CHIPGroupKeyManagementGroupKeyMapAttributeCallback::~CHIPGroupKeyManagementGroup env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( +void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -16970,8 +17017,8 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -16990,49 +17037,30 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - jint jninewElement_0_groupId = static_cast(entry_0.groupId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - jninewElement_0_groupId, newElement_0_groupId); - jobject newElement_0_groupKeySetID; - std::string newElement_0_groupKeySetIDClassName = "java/lang/Integer"; - std::string newElement_0_groupKeySetIDCtorSignature = "(I)V"; - jint jninewElement_0_groupKeySetID = static_cast(entry_0.groupKeySetID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupKeySetIDClassName.c_str(), - newElement_0_groupKeySetIDCtorSignature.c_str(), - jninewElement_0_groupKeySetID, newElement_0_groupKeySetID); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - jclass groupKeyMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", groupKeyMapStructStructClass_1); + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", + labelStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); return; } - jmethodID groupKeyMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, groupKeyMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &groupKeyMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) + jmethodID labelStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); + if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); return; } - newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, - newElement_0_groupKeySetID, newElement_0_fabricIndex); + newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17040,9 +17068,9 @@ void CHIPGroupKeyManagementGroupKeyMapAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTableAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17058,7 +17086,7 @@ CHIPGroupKeyManagementGroupTableAttributeCallback::CHIPGroupKeyManagementGroupTa } } -CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupTableAttributeCallback() +CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17069,10 +17097,8 @@ CHIPGroupKeyManagementGroupTableAttributeCallback::~CHIPGroupKeyManagementGroupT env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17081,8 +17107,8 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17101,69 +17127,11 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_groupId; - std::string newElement_0_groupIdClassName = "java/lang/Integer"; - std::string newElement_0_groupIdCtorSignature = "(I)V"; - jint jninewElement_0_groupId = static_cast(entry_0.groupId); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_groupIdClassName.c_str(), - newElement_0_groupIdCtorSignature.c_str(), - jninewElement_0_groupId, newElement_0_groupId); - jobject newElement_0_endpoints; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_endpoints); - - auto iter_newElement_0_endpoints_2 = entry_0.endpoints.begin(); - while (iter_newElement_0_endpoints_2.Next()) - { - auto & entry_2 = iter_newElement_0_endpoints_2.GetValue(); - jobject newElement_2; - std::string newElement_2ClassName = "java/lang/Integer"; - std::string newElement_2CtorSignature = "(I)V"; - jint jninewElement_2 = static_cast(entry_2); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2); - chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); - } - jobject newElement_0_groupName; - if (!entry_0.groupName.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_groupName); - } - else - { - jobject newElement_0_groupNameInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.groupName.Value(), - newElement_0_groupNameInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_groupNameInsideOptional, newElement_0_groupName); - } - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass groupInfoMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", groupInfoMapStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); - return; - } - - jmethodID groupInfoMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, groupInfoMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", &groupInfoMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); - return; - } - - newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, - newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17171,10 +17139,9 @@ void CHIPGroupKeyManagementGroupTableAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagementGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17190,7 +17157,7 @@ CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CHIPGroupKeyManagem } } -CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManagementGeneratedCommandListAttributeCallback() +CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17201,7 +17168,7 @@ CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::~CHIPGroupKeyManage env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -17211,8 +17178,8 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17243,10 +17210,8 @@ void CHIPGroupKeyManagementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManagementAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17262,7 +17227,7 @@ CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CHIPGroupKeyManageme } } -CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagementAcceptedCommandListAttributeCallback() +CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17273,8 +17238,8 @@ CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::~CHIPGroupKeyManagem env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17283,8 +17248,8 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17315,9 +17280,8 @@ void CHIPGroupKeyManagementAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17333,7 +17297,7 @@ CHIPGroupKeyManagementEventListAttributeCallback::CHIPGroupKeyManagementEventLis } } -CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventListAttributeCallback() +CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17344,8 +17308,8 @@ CHIPGroupKeyManagementEventListAttributeCallback::~CHIPGroupKeyManagementEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17354,8 +17318,8 @@ void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17386,10 +17350,8 @@ void CHIPGroupKeyManagementEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17405,7 +17367,7 @@ CHIPGroupKeyManagementAttributeListAttributeCallback::CHIPGroupKeyManagementAttr } } -CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAttributeListAttributeCallback() +CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17416,8 +17378,9 @@ CHIPGroupKeyManagementAttributeListAttributeCallback::~CHIPGroupKeyManagementAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelLabelListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17426,8 +17389,98 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); + + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", + labelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); + return; + } + + jmethodID labelStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); + if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); + return; + } + + newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17458,8 +17511,9 @@ void CHIPGroupKeyManagementAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17475,7 +17529,7 @@ CHIPFixedLabelLabelListAttributeCallback::CHIPFixedLabelLabelListAttributeCallba } } -CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallback() +CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17486,9 +17540,8 @@ CHIPFixedLabelLabelListAttributeCallback::~CHIPFixedLabelLabelListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17497,8 +17550,8 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17517,30 +17570,11 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); - return; - } - - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17548,9 +17582,8 @@ void CHIPFixedLabelLabelListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17566,7 +17599,7 @@ CHIPFixedLabelGeneratedCommandListAttributeCallback::CHIPFixedLabelGeneratedComm } } -CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCommandListAttributeCallback() +CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17577,8 +17610,8 @@ CHIPFixedLabelGeneratedCommandListAttributeCallback::~CHIPFixedLabelGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17587,8 +17620,8 @@ void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17619,9 +17652,8 @@ void CHIPFixedLabelGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17637,7 +17669,7 @@ CHIPFixedLabelAcceptedCommandListAttributeCallback::CHIPFixedLabelAcceptedComman } } -CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedCommandListAttributeCallback() +CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17648,8 +17680,8 @@ CHIPFixedLabelAcceptedCommandListAttributeCallback::~CHIPFixedLabelAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17658,8 +17690,8 @@ void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17690,8 +17722,10 @@ void CHIPFixedLabelAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CHIPProxyConfigurationGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17707,7 +17741,7 @@ CHIPFixedLabelEventListAttributeCallback::CHIPFixedLabelEventListAttributeCallba } } -CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallback() +CHIPProxyConfigurationGeneratedCommandListAttributeCallback::~CHIPProxyConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17718,8 +17752,8 @@ CHIPFixedLabelEventListAttributeCallback::~CHIPFixedLabelEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17728,8 +17762,8 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17760,8 +17794,10 @@ void CHIPFixedLabelEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CHIPProxyConfigurationAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17777,7 +17813,7 @@ CHIPFixedLabelAttributeListAttributeCallback::CHIPFixedLabelAttributeListAttribu } } -CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttributeCallback() +CHIPProxyConfigurationAcceptedCommandListAttributeCallback::~CHIPProxyConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17788,8 +17824,8 @@ CHIPFixedLabelAttributeListAttributeCallback::~CHIPFixedLabelAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17798,8 +17834,8 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17830,8 +17866,9 @@ void CHIPFixedLabelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyConfigurationEventListAttributeCallback::CHIPProxyConfigurationEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17847,7 +17884,7 @@ CHIPUserLabelLabelListAttributeCallback::CHIPUserLabelLabelListAttributeCallback } } -CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallback() +CHIPProxyConfigurationEventListAttributeCallback::~CHIPProxyConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17858,9 +17895,8 @@ CHIPUserLabelLabelListAttributeCallback::~CHIPUserLabelLabelListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelLabelListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17869,8 +17905,8 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17889,30 +17925,11 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", - labelStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); - return; - } - - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); - return; - } - - newElement_0 = env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -17920,9 +17937,10 @@ void CHIPUserLabelLabelListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyConfigurationAttributeListAttributeCallback::CHIPProxyConfigurationAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17938,7 +17956,7 @@ CHIPUserLabelGeneratedCommandListAttributeCallback::CHIPUserLabelGeneratedComman } } -CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedCommandListAttributeCallback() +CHIPProxyConfigurationAttributeListAttributeCallback::~CHIPProxyConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -17949,8 +17967,8 @@ CHIPUserLabelGeneratedCommandListAttributeCallback::~CHIPUserLabelGeneratedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -17959,8 +17977,8 @@ void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -17991,9 +18009,10 @@ void CHIPUserLabelGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CHIPProxyDiscoveryGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18009,7 +18028,7 @@ CHIPUserLabelAcceptedCommandListAttributeCallback::CHIPUserLabelAcceptedCommandL } } -CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommandListAttributeCallback() +CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::~CHIPProxyDiscoveryGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18020,7 +18039,7 @@ CHIPUserLabelAcceptedCommandListAttributeCallback::~CHIPUserLabelAcceptedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -18030,8 +18049,8 @@ void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18062,8 +18081,10 @@ void CHIPUserLabelAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CHIPProxyDiscoveryAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18079,7 +18100,7 @@ CHIPUserLabelEventListAttributeCallback::CHIPUserLabelEventListAttributeCallback } } -CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallback() +CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::~CHIPProxyDiscoveryAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18090,8 +18111,8 @@ CHIPUserLabelEventListAttributeCallback::~CHIPUserLabelEventListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18100,8 +18121,8 @@ void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18132,8 +18153,8 @@ void CHIPUserLabelEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyDiscoveryEventListAttributeCallback::CHIPProxyDiscoveryEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18149,7 +18170,7 @@ CHIPUserLabelAttributeListAttributeCallback::CHIPUserLabelAttributeListAttribute } } -CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttributeCallback() +CHIPProxyDiscoveryEventListAttributeCallback::~CHIPProxyDiscoveryEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18160,8 +18181,8 @@ CHIPUserLabelAttributeListAttributeCallback::~CHIPUserLabelAttributeListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18170,8 +18191,8 @@ void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18202,10 +18223,9 @@ void CHIPUserLabelAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CHIPProxyConfigurationGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPProxyDiscoveryAttributeListAttributeCallback::CHIPProxyDiscoveryAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18221,7 +18241,7 @@ CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CHIPProxyConfigurat } } -CHIPProxyConfigurationGeneratedCommandListAttributeCallback::~CHIPProxyConfigurationGeneratedCommandListAttributeCallback() +CHIPProxyDiscoveryAttributeListAttributeCallback::~CHIPProxyDiscoveryAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18232,8 +18252,8 @@ CHIPProxyConfigurationGeneratedCommandListAttributeCallback::~CHIPProxyConfigura env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18242,8 +18262,8 @@ void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18274,10 +18294,9 @@ void CHIPProxyConfigurationGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CHIPProxyConfigurationAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPProxyValidGeneratedCommandListAttributeCallback::CHIPProxyValidGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18293,7 +18312,7 @@ CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CHIPProxyConfigurati } } -CHIPProxyConfigurationAcceptedCommandListAttributeCallback::~CHIPProxyConfigurationAcceptedCommandListAttributeCallback() +CHIPProxyValidGeneratedCommandListAttributeCallback::~CHIPProxyValidGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18304,7 +18323,7 @@ CHIPProxyConfigurationAcceptedCommandListAttributeCallback::~CHIPProxyConfigurat env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -18314,8 +18333,8 @@ void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18346,9 +18365,9 @@ void CHIPProxyConfigurationAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyConfigurationEventListAttributeCallback::CHIPProxyConfigurationEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPProxyValidAcceptedCommandListAttributeCallback::CHIPProxyValidAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18364,7 +18383,7 @@ CHIPProxyConfigurationEventListAttributeCallback::CHIPProxyConfigurationEventLis } } -CHIPProxyConfigurationEventListAttributeCallback::~CHIPProxyConfigurationEventListAttributeCallback() +CHIPProxyValidAcceptedCommandListAttributeCallback::~CHIPProxyValidAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18375,8 +18394,8 @@ CHIPProxyConfigurationEventListAttributeCallback::~CHIPProxyConfigurationEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18385,8 +18404,8 @@ void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18417,10 +18436,8 @@ void CHIPProxyConfigurationEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyConfigurationAttributeListAttributeCallback::CHIPProxyConfigurationAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPProxyValidEventListAttributeCallback::CHIPProxyValidEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18436,7 +18453,7 @@ CHIPProxyConfigurationAttributeListAttributeCallback::CHIPProxyConfigurationAttr } } -CHIPProxyConfigurationAttributeListAttributeCallback::~CHIPProxyConfigurationAttributeListAttributeCallback() +CHIPProxyValidEventListAttributeCallback::~CHIPProxyValidEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18447,8 +18464,8 @@ CHIPProxyConfigurationAttributeListAttributeCallback::~CHIPProxyConfigurationAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18457,8 +18474,8 @@ void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18489,10 +18506,8 @@ void CHIPProxyConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CHIPProxyDiscoveryGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPProxyValidAttributeListAttributeCallback::CHIPProxyValidAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18508,7 +18523,7 @@ CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CHIPProxyDiscoveryGener } } -CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::~CHIPProxyDiscoveryGeneratedCommandListAttributeCallback() +CHIPProxyValidAttributeListAttributeCallback::~CHIPProxyValidAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18519,8 +18534,8 @@ CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::~CHIPProxyDiscoveryGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18529,8 +18544,8 @@ void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18561,9 +18576,9 @@ void CHIPProxyDiscoveryGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CHIPProxyDiscoveryAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -18580,7 +18595,7 @@ CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CHIPProxyDiscoveryAccept } } -CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::~CHIPProxyDiscoveryAcceptedCommandListAttributeCallback() +CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18591,7 +18606,7 @@ CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::~CHIPProxyDiscoveryAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -18601,8 +18616,8 @@ void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18633,8 +18648,10 @@ void CHIPProxyDiscoveryAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyDiscoveryEventListAttributeCallback::CHIPProxyDiscoveryEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18650,7 +18667,7 @@ CHIPProxyDiscoveryEventListAttributeCallback::CHIPProxyDiscoveryEventListAttribu } } -CHIPProxyDiscoveryEventListAttributeCallback::~CHIPProxyDiscoveryEventListAttributeCallback() +CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18661,8 +18678,8 @@ CHIPProxyDiscoveryEventListAttributeCallback::~CHIPProxyDiscoveryEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18671,8 +18688,8 @@ void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18703,9 +18720,8 @@ void CHIPProxyDiscoveryEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyDiscoveryAttributeListAttributeCallback::CHIPProxyDiscoveryAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18721,7 +18737,7 @@ CHIPProxyDiscoveryAttributeListAttributeCallback::CHIPProxyDiscoveryAttributeLis } } -CHIPProxyDiscoveryAttributeListAttributeCallback::~CHIPProxyDiscoveryAttributeListAttributeCallback() +CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18732,8 +18748,8 @@ CHIPProxyDiscoveryAttributeListAttributeCallback::~CHIPProxyDiscoveryAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18742,8 +18758,8 @@ void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18774,9 +18790,9 @@ void CHIPProxyDiscoveryAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyValidGeneratedCommandListAttributeCallback::CHIPProxyValidGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18792,7 +18808,7 @@ CHIPProxyValidGeneratedCommandListAttributeCallback::CHIPProxyValidGeneratedComm } } -CHIPProxyValidGeneratedCommandListAttributeCallback::~CHIPProxyValidGeneratedCommandListAttributeCallback() +CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18803,8 +18819,8 @@ CHIPProxyValidGeneratedCommandListAttributeCallback::~CHIPProxyValidGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18813,8 +18829,8 @@ void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18845,9 +18861,9 @@ void CHIPProxyValidGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyValidAcceptedCommandListAttributeCallback::CHIPProxyValidAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPIcdManagementRegisteredClientsAttributeCallback::CHIPIcdManagementRegisteredClientsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18863,7 +18879,7 @@ CHIPProxyValidAcceptedCommandListAttributeCallback::CHIPProxyValidAcceptedComman } } -CHIPProxyValidAcceptedCommandListAttributeCallback::~CHIPProxyValidAcceptedCommandListAttributeCallback() +CHIPIcdManagementRegisteredClientsAttributeCallback::~CHIPIcdManagementRegisteredClientsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18874,8 +18890,10 @@ CHIPProxyValidAcceptedCommandListAttributeCallback::~CHIPProxyValidAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18884,8 +18902,8 @@ void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18904,11 +18922,50 @@ void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); + jobject newElement_0_checkInNodeID; + std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; + std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; + jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), + newElement_0_checkInNodeIDCtorSignature.c_str(), + jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); + jobject newElement_0_monitoredSubject; + std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; + std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; + jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), + jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass monitoringRegistrationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", + monitoringRegistrationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); + return; + } + + jmethodID monitoringRegistrationStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, monitoringRegistrationStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V", + &monitoringRegistrationStructStructCtor_1); + if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); + return; + } + + newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, + newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -18916,8 +18973,10 @@ void CHIPProxyValidAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyValidEventListAttributeCallback::CHIPProxyValidEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPIcdManagementGeneratedCommandListAttributeCallback::CHIPIcdManagementGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18933,7 +18992,7 @@ CHIPProxyValidEventListAttributeCallback::CHIPProxyValidEventListAttributeCallba } } -CHIPProxyValidEventListAttributeCallback::~CHIPProxyValidEventListAttributeCallback() +CHIPIcdManagementGeneratedCommandListAttributeCallback::~CHIPIcdManagementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -18944,8 +19003,8 @@ CHIPProxyValidEventListAttributeCallback::~CHIPProxyValidEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18954,8 +19013,8 @@ void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -18986,8 +19045,10 @@ void CHIPProxyValidEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPProxyValidAttributeListAttributeCallback::CHIPProxyValidAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPIcdManagementAcceptedCommandListAttributeCallback::CHIPIcdManagementAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19003,7 +19064,7 @@ CHIPProxyValidAttributeListAttributeCallback::CHIPProxyValidAttributeListAttribu } } -CHIPProxyValidAttributeListAttributeCallback::~CHIPProxyValidAttributeListAttributeCallback() +CHIPIcdManagementAcceptedCommandListAttributeCallback::~CHIPIcdManagementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19014,8 +19075,8 @@ CHIPProxyValidAttributeListAttributeCallback::~CHIPProxyValidAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19024,8 +19085,8 @@ void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19056,10 +19117,8 @@ void CHIPProxyValidAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPIcdManagementEventListAttributeCallback::CHIPIcdManagementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19075,7 +19134,7 @@ CHIPBooleanStateGeneratedCommandListAttributeCallback::CHIPBooleanStateGenerated } } -CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGeneratedCommandListAttributeCallback() +CHIPIcdManagementEventListAttributeCallback::~CHIPIcdManagementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19086,8 +19145,8 @@ CHIPBooleanStateGeneratedCommandListAttributeCallback::~CHIPBooleanStateGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19096,8 +19155,8 @@ void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19128,10 +19187,9 @@ void CHIPBooleanStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPIcdManagementAttributeListAttributeCallback::CHIPIcdManagementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19147,7 +19205,7 @@ CHIPBooleanStateAcceptedCommandListAttributeCallback::CHIPBooleanStateAcceptedCo } } -CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedCommandListAttributeCallback() +CHIPIcdManagementAttributeListAttributeCallback::~CHIPIcdManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19158,8 +19216,8 @@ CHIPBooleanStateAcceptedCommandListAttributeCallback::~CHIPBooleanStateAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19168,8 +19226,8 @@ void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19200,8 +19258,9 @@ void CHIPBooleanStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimerGeneratedCommandListAttributeCallback::CHIPTimerGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19217,7 +19276,7 @@ CHIPBooleanStateEventListAttributeCallback::CHIPBooleanStateEventListAttributeCa } } -CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeCallback() +CHIPTimerGeneratedCommandListAttributeCallback::~CHIPTimerGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19228,8 +19287,8 @@ CHIPBooleanStateEventListAttributeCallback::~CHIPBooleanStateEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19238,8 +19297,8 @@ void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19270,9 +19329,8 @@ void CHIPBooleanStateEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimerAcceptedCommandListAttributeCallback::CHIPTimerAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19288,7 +19346,7 @@ CHIPBooleanStateAttributeListAttributeCallback::CHIPBooleanStateAttributeListAtt } } -CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAttributeCallback() +CHIPTimerAcceptedCommandListAttributeCallback::~CHIPTimerAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19299,8 +19357,8 @@ CHIPBooleanStateAttributeListAttributeCallback::~CHIPBooleanStateAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19309,8 +19367,8 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19341,9 +19399,8 @@ void CHIPBooleanStateAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIcdManagementRegisteredClientsAttributeCallback::CHIPIcdManagementRegisteredClientsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTimerEventListAttributeCallback::CHIPTimerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19359,7 +19416,7 @@ CHIPIcdManagementRegisteredClientsAttributeCallback::CHIPIcdManagementRegistered } } -CHIPIcdManagementRegisteredClientsAttributeCallback::~CHIPIcdManagementRegisteredClientsAttributeCallback() +CHIPTimerEventListAttributeCallback::~CHIPTimerEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19370,10 +19427,8 @@ CHIPIcdManagementRegisteredClientsAttributeCallback::~CHIPIcdManagementRegistere env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> & list) +void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19382,8 +19437,8 @@ void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19402,50 +19457,11 @@ void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_checkInNodeID; - std::string newElement_0_checkInNodeIDClassName = "java/lang/Long"; - std::string newElement_0_checkInNodeIDCtorSignature = "(J)V"; - jlong jninewElement_0_checkInNodeID = static_cast(entry_0.checkInNodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_checkInNodeIDClassName.c_str(), - newElement_0_checkInNodeIDCtorSignature.c_str(), - jninewElement_0_checkInNodeID, newElement_0_checkInNodeID); - jobject newElement_0_monitoredSubject; - std::string newElement_0_monitoredSubjectClassName = "java/lang/Long"; - std::string newElement_0_monitoredSubjectCtorSignature = "(J)V"; - jlong jninewElement_0_monitoredSubject = static_cast(entry_0.monitoredSubject); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_monitoredSubjectClassName.c_str(), newElement_0_monitoredSubjectCtorSignature.c_str(), - jninewElement_0_monitoredSubject, newElement_0_monitoredSubject); - jobject newElement_0_fabricIndex; - std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; - std::string newElement_0_fabricIndexCtorSignature = "(I)V"; - jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), - newElement_0_fabricIndexCtorSignature.c_str(), - jninewElement_0_fabricIndex, newElement_0_fabricIndex); - - jclass monitoringRegistrationStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", - monitoringRegistrationStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); - return; - } - - jmethodID monitoringRegistrationStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, monitoringRegistrationStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;)V", - &monitoringRegistrationStructStructCtor_1); - if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); - return; - } - - newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, - newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_fabricIndex); + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19453,10 +19469,8 @@ void CHIPIcdManagementRegisteredClientsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIcdManagementGeneratedCommandListAttributeCallback::CHIPIcdManagementGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTimerAttributeListAttributeCallback::CHIPTimerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19472,7 +19486,7 @@ CHIPIcdManagementGeneratedCommandListAttributeCallback::CHIPIcdManagementGenerat } } -CHIPIcdManagementGeneratedCommandListAttributeCallback::~CHIPIcdManagementGeneratedCommandListAttributeCallback() +CHIPTimerAttributeListAttributeCallback::~CHIPTimerAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19483,8 +19497,8 @@ CHIPIcdManagementGeneratedCommandListAttributeCallback::~CHIPIcdManagementGenera env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19493,8 +19507,8 @@ void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19525,9 +19539,9 @@ void CHIPIcdManagementGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIcdManagementAcceptedCommandListAttributeCallback::CHIPIcdManagementAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CHIPOvenCavityOperationalStatePhaseListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -19544,7 +19558,7 @@ CHIPIcdManagementAcceptedCommandListAttributeCallback::CHIPIcdManagementAccepted } } -CHIPIcdManagementAcceptedCommandListAttributeCallback::~CHIPIcdManagementAcceptedCommandListAttributeCallback() +CHIPOvenCavityOperationalStatePhaseListAttributeCallback::~CHIPOvenCavityOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19555,8 +19569,8 @@ CHIPIcdManagementAcceptedCommandListAttributeCallback::~CHIPIcdManagementAccepte env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19565,8 +19579,8 @@ void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19578,27 +19592,32 @@ void CHIPIcdManagementAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + if (list.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPIcdManagementEventListAttributeCallback::CHIPIcdManagementEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19614,7 +19633,7 @@ CHIPIcdManagementEventListAttributeCallback::CHIPIcdManagementEventListAttribute } } -CHIPIcdManagementEventListAttributeCallback::~CHIPIcdManagementEventListAttributeCallback() +CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19625,8 +19644,8 @@ CHIPIcdManagementEventListAttributeCallback::~CHIPIcdManagementEventListAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19634,9 +19653,8 @@ void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19644,32 +19662,30 @@ void CHIPIcdManagementEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPIcdManagementAttributeListAttributeCallback::CHIPIcdManagementAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19685,7 +19701,7 @@ CHIPIcdManagementAttributeListAttributeCallback::CHIPIcdManagementAttributeListA } } -CHIPIcdManagementAttributeListAttributeCallback::~CHIPIcdManagementAttributeListAttributeCallback() +CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::~CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19696,8 +19712,8 @@ CHIPIcdManagementAttributeListAttributeCallback::~CHIPIcdManagementAttributeList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19705,9 +19721,8 @@ void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19715,32 +19730,30 @@ void CHIPIcdManagementAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTimerGeneratedCommandListAttributeCallback::CHIPTimerGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: + CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19756,7 +19769,8 @@ CHIPTimerGeneratedCommandListAttributeCallback::CHIPTimerGeneratedCommandListAtt } } -CHIPTimerGeneratedCommandListAttributeCallback::~CHIPTimerGeneratedCommandListAttributeCallback() +CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: + ~CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19767,8 +19781,10 @@ CHIPTimerGeneratedCommandListAttributeCallback::~CHIPTimerGeneratedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19777,8 +19793,8 @@ void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19797,11 +19813,49 @@ void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); + return; + } + + jmethodID operationalStateStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &operationalStateStructStructCtor_1); + if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -19809,8 +19863,10 @@ void CHIPTimerGeneratedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimerAcceptedCommandListAttributeCallback::CHIPTimerAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: + CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19826,7 +19882,8 @@ CHIPTimerAcceptedCommandListAttributeCallback::CHIPTimerAcceptedCommandListAttri } } -CHIPTimerAcceptedCommandListAttributeCallback::~CHIPTimerAcceptedCommandListAttributeCallback() +CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: + ~CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19837,8 +19894,8 @@ CHIPTimerAcceptedCommandListAttributeCallback::~CHIPTimerAcceptedCommandListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19847,8 +19904,8 @@ void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19879,8 +19936,10 @@ void CHIPTimerAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimerEventListAttributeCallback::CHIPTimerEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: + CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19896,7 +19955,8 @@ CHIPTimerEventListAttributeCallback::CHIPTimerEventListAttributeCallback(jobject } } -CHIPTimerEventListAttributeCallback::~CHIPTimerEventListAttributeCallback() +CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: + ~CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19907,8 +19967,8 @@ CHIPTimerEventListAttributeCallback::~CHIPTimerEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19917,8 +19977,8 @@ void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -19949,8 +20009,10 @@ void CHIPTimerEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTimerAttributeListAttributeCallback::CHIPTimerAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenCavityOperationalStateEventListAttributeCallback::CHIPOvenCavityOperationalStateEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19966,7 +20028,7 @@ CHIPTimerAttributeListAttributeCallback::CHIPTimerAttributeListAttributeCallback } } -CHIPTimerAttributeListAttributeCallback::~CHIPTimerAttributeListAttributeCallback() +CHIPOvenCavityOperationalStateEventListAttributeCallback::~CHIPOvenCavityOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19977,8 +20039,8 @@ CHIPTimerAttributeListAttributeCallback::~CHIPTimerAttributeListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19987,8 +20049,8 @@ void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20019,9 +20081,9 @@ void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CHIPOvenCavityOperationalStatePhaseListAttributeCallback( +CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CHIPOvenCavityOperationalStateAttributeListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -20038,7 +20100,7 @@ CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CHIPOvenCavityOperatio } } -CHIPOvenCavityOperationalStatePhaseListAttributeCallback::~CHIPOvenCavityOperationalStatePhaseListAttributeCallback() +CHIPOvenCavityOperationalStateAttributeListAttributeCallback::~CHIPOvenCavityOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20049,8 +20111,8 @@ CHIPOvenCavityOperationalStatePhaseListAttributeCallback::~CHIPOvenCavityOperati env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20059,8 +20121,8 @@ void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20071,33 +20133,28 @@ void CHIPOvenCavityOperationalStatePhaseListAttributeCallback::CallbackFn( err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20113,7 +20170,7 @@ CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CHIPOvenCavityOpera } } -CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback() +CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20124,8 +20181,9 @@ CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::~CHIPOvenCavityOper env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20133,8 +20191,9 @@ void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(voi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20142,30 +20201,111 @@ void CHIPOvenCavityOperationalStateCurrentPhaseAttributeCallback::CallbackFn(voi ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); + return; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); + return; + } + + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20181,7 +20321,7 @@ CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CHIPOvenCavityOper } } -CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::~CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback() +CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20192,8 +20332,7 @@ CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::~CHIPOvenCavityOpe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20201,8 +20340,8 @@ void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20210,7 +20349,7 @@ void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -20220,20 +20359,18 @@ void CHIPOvenCavityOperationalStateCountdownTimeAttributeCallback::CallbackFn( } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: - CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20249,8 +20386,7 @@ CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: } } -CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: - ~CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback() +CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20261,10 +20397,7 @@ CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> & list) +void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20272,9 +20405,8 @@ void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20282,71 +20414,29 @@ void CHIPOvenCavityOperationalStateOperationalStateListAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); - return; - } - - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: - CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20362,8 +20452,7 @@ CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: } } -CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: - ~CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback() +CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20374,7 +20463,7 @@ CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20384,8 +20473,8 @@ void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::Callba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20416,10 +20505,9 @@ void CHIPOvenCavityOperationalStateGeneratedCommandListAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: - CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20435,8 +20523,7 @@ CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: } } -CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: - ~CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback() +CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20447,8 +20534,8 @@ CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20457,8 +20544,8 @@ void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::Callbac VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20489,10 +20576,8 @@ void CHIPOvenCavityOperationalStateAcceptedCommandListAttributeCallback::Callbac env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStateEventListAttributeCallback::CHIPOvenCavityOperationalStateEventListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20508,7 +20593,7 @@ CHIPOvenCavityOperationalStateEventListAttributeCallback::CHIPOvenCavityOperatio } } -CHIPOvenCavityOperationalStateEventListAttributeCallback::~CHIPOvenCavityOperationalStateEventListAttributeCallback() +CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20519,8 +20604,8 @@ CHIPOvenCavityOperationalStateEventListAttributeCallback::~CHIPOvenCavityOperati env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20529,8 +20614,8 @@ void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20561,10 +20646,8 @@ void CHIPOvenCavityOperationalStateEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CHIPOvenCavityOperationalStateAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20580,7 +20663,7 @@ CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CHIPOvenCavityOper } } -CHIPOvenCavityOperationalStateAttributeListAttributeCallback::~CHIPOvenCavityOperationalStateAttributeListAttributeCallback() +CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20591,8 +20674,8 @@ CHIPOvenCavityOperationalStateAttributeListAttributeCallback::~CHIPOvenCavityOpe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20601,8 +20684,8 @@ void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20633,8 +20716,10 @@ void CHIPOvenCavityOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20650,7 +20735,7 @@ CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttribute } } -CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttributeCallback() +CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::~CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20661,9 +20746,8 @@ CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttribut env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20672,8 +20756,8 @@ void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20692,91 +20776,11 @@ void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20784,8 +20788,10 @@ void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20801,7 +20807,7 @@ CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallba } } -CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallback() +CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::~CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20812,7 +20818,8 @@ CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20820,8 +20827,8 @@ void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20849,8 +20856,10 @@ void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20866,7 +20875,7 @@ CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject } } -CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() +CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::~CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20877,7 +20886,8 @@ CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20885,8 +20895,9 @@ void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20894,29 +20905,33 @@ void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip: ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20932,7 +20947,7 @@ CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandL } } -CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommandListAttributeCallback() +CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::~CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20943,7 +20958,7 @@ CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommand env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20953,8 +20968,8 @@ void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -20985,9 +21000,9 @@ void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsEventListAttributeCallback::CHIPLaundryDryerControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21003,7 +21018,7 @@ CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandLis } } -CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandListAttributeCallback() +CHIPLaundryDryerControlsEventListAttributeCallback::~CHIPLaundryDryerControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21014,8 +21029,8 @@ CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21024,8 +21039,8 @@ void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21056,8 +21071,10 @@ void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryDryerControlsAttributeListAttributeCallback::CHIPLaundryDryerControlsAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21073,7 +21090,7 @@ CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(j } } -CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback() +CHIPLaundryDryerControlsAttributeListAttributeCallback::~CHIPLaundryDryerControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21084,8 +21101,8 @@ CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21094,8 +21111,8 @@ void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21126,8 +21143,9 @@ void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21143,7 +21161,7 @@ CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCa } } -CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeCallback() +CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21154,8 +21172,8 @@ CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21163,9 +21181,8 @@ void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21173,33 +21190,28 @@ void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21215,7 +21227,7 @@ CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CHIPLaundryDrye } } -CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::~CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback() +CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21226,8 +21238,9 @@ CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::~CHIPLaundryDry env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21236,8 +21249,8 @@ void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21256,11 +21269,82 @@ void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass semanticTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + return; + } + + jmethodID semanticTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &semanticTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + return; + } + + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + return; + } + + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21268,10 +21352,8 @@ void CHIPLaundryDryerControlsSupportedDrynessLevelsAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21287,7 +21369,7 @@ CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CHIPLaundryDryerC } } -CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::~CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback() +CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21298,8 +21380,7 @@ CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::~CHIPLaundryDryer env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21307,8 +21388,8 @@ void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21336,10 +21417,8 @@ void CHIPLaundryDryerControlsSelectedDrynessLevelAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21355,7 +21434,7 @@ CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CHIPLaundryDryerC } } -CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::~CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback() +CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21366,8 +21445,7 @@ CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::~CHIPLaundryDryer env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21375,9 +21453,8 @@ void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21385,33 +21462,29 @@ void CHIPLaundryDryerControlsGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21427,7 +21500,7 @@ CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CHIPLaundryDryerCo } } -CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::~CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback() +CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21438,7 +21511,7 @@ CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::~CHIPLaundryDryerC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21448,8 +21521,8 @@ void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21480,9 +21553,9 @@ void CHIPLaundryDryerControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryDryerControlsEventListAttributeCallback::CHIPLaundryDryerControlsEventListAttributeCallback(jobject javaCallback, +CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21498,7 +21571,7 @@ CHIPLaundryDryerControlsEventListAttributeCallback::CHIPLaundryDryerControlsEven } } -CHIPLaundryDryerControlsEventListAttributeCallback::~CHIPLaundryDryerControlsEventListAttributeCallback() +CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21508,9 +21581,9 @@ CHIPLaundryDryerControlsEventListAttributeCallback::~CHIPLaundryDryerControlsEve } env->DeleteGlobalRef(javaCallbackRef); } - -void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) + +void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21519,8 +21592,8 @@ void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21551,10 +21624,8 @@ void CHIPLaundryDryerControlsEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryDryerControlsAttributeListAttributeCallback::CHIPLaundryDryerControlsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21570,7 +21641,7 @@ CHIPLaundryDryerControlsAttributeListAttributeCallback::CHIPLaundryDryerControls } } -CHIPLaundryDryerControlsAttributeListAttributeCallback::~CHIPLaundryDryerControlsAttributeListAttributeCallback() +CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21581,8 +21652,8 @@ CHIPLaundryDryerControlsAttributeListAttributeCallback::~CHIPLaundryDryerControl env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21591,8 +21662,8 @@ void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21623,9 +21694,8 @@ void CHIPLaundryDryerControlsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21641,7 +21711,7 @@ CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespac } } -CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() +CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21652,8 +21722,8 @@ CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21661,8 +21731,9 @@ void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21670,28 +21741,33 @@ void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21707,7 +21783,7 @@ CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttri } } -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21718,9 +21794,10 @@ CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21729,8 +21806,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21757,21 +21834,30 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -21780,36 +21866,36 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); return; } - jmethodID semanticTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &semanticTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); return; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); return; } @@ -21819,12 +21905,12 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); return; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21832,8 +21918,9 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21849,7 +21936,7 @@ CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCa } } -CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() +CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21860,7 +21947,8 @@ CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21868,8 +21956,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21897,8 +21985,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21914,7 +22002,7 @@ CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(job } } -CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() +CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21925,7 +22013,7 @@ CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21933,8 +22021,8 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -21962,9 +22050,10 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21980,7 +22069,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedComm } } -CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21991,7 +22080,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22001,8 +22090,8 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22033,9 +22122,10 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22051,7 +22141,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedComman } } -CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22062,7 +22152,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22072,8 +22162,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22104,8 +22194,9 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22121,7 +22212,7 @@ CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallba } } -CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() +CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22132,8 +22223,8 @@ CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22142,8 +22233,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22174,8 +22265,9 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22191,7 +22283,7 @@ CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttribu } } -CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() +CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22202,8 +22294,8 @@ CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22212,8 +22304,8 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22244,9 +22336,10 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22263,7 +22356,8 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSuppo } } -CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22274,10 +22368,10 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22286,8 +22380,9 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22348,10 +22443,12 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + ChipLogError( + Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); return; } @@ -22361,7 +22458,9 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); return; } @@ -22372,10 +22471,12 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); return; } @@ -22385,7 +22486,9 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); return; } @@ -22398,9 +22501,11 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22416,7 +22521,8 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpM } } -CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22427,8 +22533,8 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22436,8 +22542,9 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22465,8 +22572,11 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22482,7 +22592,8 @@ CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttribu } } -CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22493,7 +22604,8 @@ CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22501,8 +22613,9 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22530,9 +22643,10 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22549,7 +22663,8 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherMod } } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22560,7 +22675,7 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22570,8 +22685,11 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22602,9 +22720,10 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22621,7 +22740,8 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherMode } } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22632,7 +22752,7 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22642,8 +22762,11 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22674,9 +22797,11 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22692,7 +22817,8 @@ CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListA } } -CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22703,8 +22829,8 @@ CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22713,8 +22839,9 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22745,9 +22872,11 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: + CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22763,7 +22892,8 @@ CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttrib } } -CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: + ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22774,7 +22904,7 @@ CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22784,8 +22914,9 @@ void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -22816,10 +22947,9 @@ void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22836,8 +22966,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22848,10 +22977,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) +void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22860,120 +22987,27 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError( - Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); - return; - } + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22981,10 +23015,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23001,8 +23034,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback: } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23013,8 +23045,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23022,9 +23054,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23052,10 +23083,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23072,8 +23102,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23084,8 +23113,9 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23093,9 +23123,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23103,30 +23133,32 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23143,8 +23175,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23155,7 +23186,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23165,11 +23196,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23200,10 +23228,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23220,8 +23247,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23232,7 +23258,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23242,11 +23268,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23277,11 +23300,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23297,8 +23318,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() +CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23309,7 +23329,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23319,9 +23339,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23352,10 +23371,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: - CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23372,8 +23390,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: - ~CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() +CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23384,7 +23401,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23394,9 +23411,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23427,10 +23443,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23446,7 +23460,7 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsS } } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() +CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23457,8 +23471,9 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControls env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23467,8 +23482,8 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23487,7 +23502,91 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + return; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + return; + } + + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23495,10 +23594,8 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23514,7 +23611,7 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherCon } } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() +CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23525,8 +23622,7 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherCo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23534,8 +23630,8 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23563,83 +23659,9 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23655,7 +23677,7 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWashe } } -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() +CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23666,7 +23688,7 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWash env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23676,8 +23698,8 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23708,10 +23730,9 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23727,7 +23748,7 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasher } } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() +CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23738,7 +23759,7 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWashe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23748,8 +23769,8 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23780,9 +23801,8 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23798,7 +23818,7 @@ CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEv } } -CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() +CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23809,8 +23829,8 @@ CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsE env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23819,8 +23839,8 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23851,10 +23871,8 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23870,7 +23888,7 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherContro } } -CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() +CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23881,8 +23899,8 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherContr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23891,8 +23909,8 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -23923,8 +23941,9 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23940,7 +23959,7 @@ CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttri } } -CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() +CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23951,9 +23970,9 @@ CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( +void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23962,8 +23981,8 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24024,10 +24043,10 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); return; } @@ -24037,7 +24056,7 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( &modeTagStructStructCtor_3); if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); return; } @@ -24048,10 +24067,10 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); return; } @@ -24061,7 +24080,7 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( &modeOptionStructStructCtor_1); if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); return; } @@ -24074,8 +24093,8 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24091,7 +24110,7 @@ CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(job } } -CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() +CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24102,7 +24121,7 @@ CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24110,8 +24129,8 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24129,19 +24148,92 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24157,7 +24249,7 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedComm } } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24168,7 +24260,7 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24178,8 +24270,8 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24210,9 +24302,8 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24228,7 +24319,7 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedComman } } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() +CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24239,8 +24330,8 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24249,8 +24340,8 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24281,8 +24372,9 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24298,7 +24390,7 @@ CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallba } } -CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() +CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24309,8 +24401,8 @@ CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24319,8 +24411,8 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24351,8 +24443,10 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: + CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24368,7 +24462,8 @@ CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttribu } } -CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: + ~CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24379,8 +24474,8 @@ CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24389,8 +24484,8 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24409,11 +24504,7 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24421,9 +24512,10 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24439,7 +24531,7 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesA } } -CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() +CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24450,9 +24542,8 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModes env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24461,8 +24552,8 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24481,91 +24572,11 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24573,8 +24584,10 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24590,7 +24603,7 @@ CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback } } -CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() +CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24601,7 +24614,8 @@ CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24609,8 +24623,9 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24618,30 +24633,32 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24657,7 +24674,7 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGenerated } } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() +CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24668,8 +24685,8 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24678,9 +24695,9 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; VerifyOrReturn(javaCallbackRef != nullptr, @@ -24710,9 +24727,9 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24729,7 +24746,7 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCo } } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() +CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24740,8 +24757,8 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24750,8 +24767,8 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24782,8 +24799,10 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24799,7 +24818,7 @@ CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCa } } -CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24810,8 +24829,8 @@ CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24820,8 +24839,8 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24852,9 +24871,10 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24870,7 +24890,7 @@ CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAtt } } -CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24881,8 +24901,8 @@ CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24891,8 +24911,8 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24923,10 +24943,9 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24942,8 +24961,7 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: } } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: - ~CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() +CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24954,8 +24972,8 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24964,8 +24982,8 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -24984,7 +25002,11 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -24992,10 +25014,9 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25011,7 +25032,7 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureCont } } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25022,8 +25043,8 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25032,8 +25053,8 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25064,10 +25085,9 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25083,7 +25103,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureContr } } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() +CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25094,8 +25114,9 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureCont env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25104,8 +25125,8 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25124,11 +25145,91 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + return; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + return; + } + + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25136,9 +25237,9 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25154,7 +25255,7 @@ CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventLis } } -CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() +CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25165,8 +25266,8 @@ CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25174,9 +25275,8 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25184,33 +25284,28 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25226,7 +25321,7 @@ CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttr } } -CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() +CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25236,9 +25331,8 @@ CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAtt } env->DeleteGlobalRef(javaCallbackRef); } - -void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) + +void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25246,9 +25340,8 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25256,32 +25349,29 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( +CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25298,7 +25388,7 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlar } } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() +CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25309,7 +25399,7 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAla env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25319,8 +25409,8 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25351,9 +25441,9 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25370,7 +25460,7 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarm } } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() +CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25381,7 +25471,7 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25391,8 +25481,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25423,9 +25513,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25441,7 +25530,7 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListA } } -CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() +CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25452,8 +25541,8 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25462,8 +25551,8 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25494,9 +25583,9 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25512,7 +25601,7 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttrib } } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() +CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25523,7 +25612,7 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( +void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25533,8 +25622,8 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25565,9 +25654,9 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25583,7 +25672,7 @@ CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedMo } } -CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() +CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25594,9 +25683,8 @@ CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25605,8 +25693,8 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25625,91 +25713,11 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25717,9 +25725,9 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25735,7 +25743,7 @@ CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAtt } } -CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() +CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25746,8 +25754,8 @@ CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25755,8 +25763,9 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25764,28 +25773,31 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25801,7 +25813,7 @@ CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCall } } -CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() +CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25812,16 +25824,18 @@ CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); jobject javaCallbackRef; - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25829,30 +25843,31 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25868,7 +25883,7 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGener } } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() +CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25879,8 +25894,8 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25889,8 +25904,8 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25921,9 +25936,9 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25940,7 +25955,7 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAccept } } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25951,7 +25966,7 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25961,8 +25976,8 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -25993,8 +26008,10 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26010,7 +26027,7 @@ CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttribu } } -CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26021,8 +26038,8 @@ CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26031,8 +26048,8 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26063,9 +26080,8 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26081,7 +26097,7 @@ CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeLis } } -CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() +CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26092,8 +26108,8 @@ CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26102,8 +26118,8 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26134,9 +26150,9 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26152,7 +26168,7 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedComm } } -CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() +CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26163,8 +26179,8 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26173,8 +26189,8 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26205,9 +26221,10 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26223,7 +26240,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedComman } } -CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26234,7 +26251,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26244,8 +26261,8 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26276,8 +26293,10 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26293,7 +26312,7 @@ CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallba } } -CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26304,8 +26323,8 @@ CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26314,8 +26333,8 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26346,8 +26365,8 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26363,7 +26382,7 @@ CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttribu } } -CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() +CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26374,8 +26393,8 @@ CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26384,8 +26403,8 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26416,10 +26435,9 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26435,7 +26453,7 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGenerated } } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() +CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26446,8 +26464,8 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26456,8 +26474,8 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26488,9 +26506,9 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26507,7 +26525,7 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCo } } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26518,8 +26536,10 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26528,31 +26548,111 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + return; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + return; + } - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); + return; + } - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); + return; + } - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26560,8 +26660,10 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26577,7 +26679,7 @@ CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCa } } -CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26588,8 +26690,8 @@ CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26598,8 +26700,8 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26630,9 +26732,10 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26648,7 +26751,7 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAtt } } -CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26659,8 +26762,8 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26669,8 +26772,8 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26701,10 +26804,9 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26720,7 +26822,7 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGen } } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() +CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26731,8 +26833,8 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26741,8 +26843,8 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26773,10 +26875,9 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26792,7 +26893,7 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcce } } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() +CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26803,8 +26904,8 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26813,8 +26914,8 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26845,8 +26946,10 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26862,7 +26965,7 @@ CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttri } } -CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26873,8 +26976,8 @@ CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26883,8 +26986,8 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26915,9 +27018,10 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26933,7 +27037,7 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeL } } -CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26944,8 +27048,8 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26954,8 +27058,8 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -26986,10 +27090,9 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27005,7 +27108,7 @@ CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSuppo } } -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() +CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27016,10 +27119,8 @@ CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27028,8 +27129,8 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27048,91 +27149,11 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); - return; - } - - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27140,9 +27161,9 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27159,7 +27180,7 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenMod } } -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() +CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27170,8 +27191,8 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27180,8 +27201,8 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27212,10 +27233,9 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27231,7 +27251,7 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenMode } } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() +CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27242,8 +27262,8 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27252,8 +27272,8 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27265,28 +27285,31 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + if (list.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27302,7 +27325,7 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListA } } -CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() +CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27313,8 +27336,8 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27322,9 +27345,8 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27332,32 +27354,97 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27373,7 +27460,7 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttrib } } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() +CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27384,8 +27471,10 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27394,8 +27483,8 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27414,11 +27503,49 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); + return; + } + + jmethodID operationalStateStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &operationalStateStructStructCtor_1); + if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -27426,9 +27553,9 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( +CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27445,7 +27572,7 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOven } } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() +CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27456,7 +27583,7 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27466,8 +27593,8 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27498,9 +27625,9 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( +CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27517,7 +27644,7 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenC } } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() +CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27528,7 +27655,7 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOven env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27538,8 +27665,8 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27570,9 +27697,9 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27588,7 +27715,7 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEven } } -CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() +CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27599,8 +27726,8 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27609,8 +27736,8 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27641,10 +27768,9 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27660,7 +27786,7 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControl } } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() +CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27671,7 +27797,7 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenContro env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( +void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27681,8 +27807,8 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27713,9 +27839,9 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27731,7 +27857,7 @@ CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAtt } } -CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() +CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27742,7 +27868,7 @@ CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( +void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::Nullable> & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27752,8 +27878,8 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27787,9 +27913,10 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27805,7 +27932,7 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPh } } -CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27816,8 +27943,8 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentP env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27825,8 +27952,8 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27854,9 +27981,10 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27872,7 +28000,7 @@ CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdow } } -CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() +CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27883,8 +28011,8 @@ CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27892,8 +28020,8 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27921,9 +28049,9 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( +CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27940,7 +28068,7 @@ CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateO } } -CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() +CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27951,10 +28079,10 @@ CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( +void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27963,8 +28091,8 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28006,11 +28134,11 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( jclass operationalStateStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", operationalStateStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); return; } @@ -28020,156 +28148,12 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( &operationalStateStructStructCtor_1); if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} - -CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28177,9 +28161,10 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28195,7 +28180,7 @@ CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAtt } } -CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28206,8 +28191,8 @@ CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28216,8 +28201,8 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28248,9 +28233,10 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28266,7 +28252,7 @@ CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttribut } } -CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28277,8 +28263,8 @@ CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28287,8 +28273,8 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28319,9 +28305,9 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, +CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28337,7 +28323,7 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseL } } -CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() +CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28348,8 +28334,8 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhase env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28358,8 +28344,8 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28371,31 +28357,28 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28412,7 +28395,7 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCur } } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() +CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28423,8 +28406,8 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28432,8 +28415,9 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28441,29 +28425,32 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, +CHIPScenesManagementLastConfiguredByAttributeCallback::CHIPScenesManagementLastConfiguredByAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28480,7 +28467,7 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCo } } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() +CHIPScenesManagementLastConfiguredByAttributeCallback::~CHIPScenesManagementLastConfiguredByAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28491,8 +28478,8 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPScenesManagementLastConfiguredByAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28500,8 +28487,8 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28529,9 +28516,9 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPScenesManagementFabricSceneInfoAttributeCallback::CHIPScenesManagementFabricSceneInfoAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28548,7 +28535,7 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() +CHIPScenesManagementFabricSceneInfoAttributeCallback::~CHIPScenesManagementFabricSceneInfoAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28559,10 +28546,10 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( +void CHIPScenesManagementFabricSceneInfoAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28571,8 +28558,8 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28591,49 +28578,72 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass operationalStateStructStructClass_1; + jclass sceneInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); return; } - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + jmethodID sceneInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &sceneInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); return; } - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -28641,9 +28651,9 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( +CHIPScenesManagementGeneratedCommandListAttributeCallback::CHIPScenesManagementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28660,7 +28670,7 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() +CHIPScenesManagementGeneratedCommandListAttributeCallback::~CHIPScenesManagementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28671,7 +28681,7 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPScenesManagementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28681,8 +28691,8 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28713,9 +28723,9 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( +CHIPScenesManagementAcceptedCommandListAttributeCallback::CHIPScenesManagementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28732,7 +28742,7 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalS } } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() +CHIPScenesManagementAcceptedCommandListAttributeCallback::~CHIPScenesManagementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28743,7 +28753,7 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperational env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPScenesManagementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28753,8 +28763,8 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28785,9 +28795,9 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPScenesManagementEventListAttributeCallback::CHIPScenesManagementEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28803,7 +28813,7 @@ CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventL } } -CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() +CHIPScenesManagementEventListAttributeCallback::~CHIPScenesManagementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28814,8 +28824,8 @@ CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPScenesManagementEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -28824,8 +28834,8 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -28856,10 +28866,9 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPScenesManagementAttributeListAttributeCallback::CHIPScenesManagementAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28875,7 +28884,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAt } } -CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() +CHIPScenesManagementAttributeListAttributeCallback::~CHIPScenesManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28886,7 +28895,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( +void CHIPScenesManagementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -28896,8 +28905,8 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index ed3abef0aef44a..cdc3c3a897fb25 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -195,186 +195,6 @@ class ChipClusters: }, }, } - _SCENES_CLUSTER_INFO = { - "clusterName": "Scenes", - "clusterId": 0x00000005, - "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "AddScene", - "args": { - "groupID": "int", - "sceneID": "int", - "transitionTime": "int", - "sceneName": "str", - "extensionFieldSets": "ExtensionFieldSet", - }, - }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "ViewScene", - "args": { - "groupID": "int", - "sceneID": "int", - }, - }, - 0x00000002: { - "commandId": 0x00000002, - "commandName": "RemoveScene", - "args": { - "groupID": "int", - "sceneID": "int", - }, - }, - 0x00000003: { - "commandId": 0x00000003, - "commandName": "RemoveAllScenes", - "args": { - "groupID": "int", - }, - }, - 0x00000004: { - "commandId": 0x00000004, - "commandName": "StoreScene", - "args": { - "groupID": "int", - "sceneID": "int", - }, - }, - 0x00000005: { - "commandId": 0x00000005, - "commandName": "RecallScene", - "args": { - "groupID": "int", - "sceneID": "int", - "transitionTime": "int", - }, - }, - 0x00000006: { - "commandId": 0x00000006, - "commandName": "GetSceneMembership", - "args": { - "groupID": "int", - }, - }, - 0x00000040: { - "commandId": 0x00000040, - "commandName": "EnhancedAddScene", - "args": { - "groupID": "int", - "sceneID": "int", - "transitionTime": "int", - "sceneName": "str", - "extensionFieldSets": "ExtensionFieldSet", - }, - }, - 0x00000041: { - "commandId": 0x00000041, - "commandName": "EnhancedViewScene", - "args": { - "groupID": "int", - "sceneID": "int", - }, - }, - 0x00000042: { - "commandId": 0x00000042, - "commandName": "CopyScene", - "args": { - "mode": "int", - "groupIdentifierFrom": "int", - "sceneIdentifierFrom": "int", - "groupIdentifierTo": "int", - "sceneIdentifierTo": "int", - }, - }, - }, - "attributes": { - 0x00000000: { - "attributeName": "SceneCount", - "attributeId": 0x00000000, - "type": "int", - "reportable": True, - }, - 0x00000001: { - "attributeName": "CurrentScene", - "attributeId": 0x00000001, - "type": "int", - "reportable": True, - }, - 0x00000002: { - "attributeName": "CurrentGroup", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - }, - 0x00000003: { - "attributeName": "SceneValid", - "attributeId": 0x00000003, - "type": "bool", - "reportable": True, - }, - 0x00000004: { - "attributeName": "NameSupport", - "attributeId": 0x00000004, - "type": "int", - "reportable": True, - }, - 0x00000005: { - "attributeName": "LastConfiguredBy", - "attributeId": 0x00000005, - "type": "int", - "reportable": True, - }, - 0x00000006: { - "attributeName": "SceneTableSize", - "attributeId": 0x00000006, - "type": "int", - "reportable": True, - }, - 0x00000007: { - "attributeName": "FabricSceneInfo", - "attributeId": 0x00000007, - "type": "", - "reportable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, - 0x0000FFFB: { - "attributeName": "AttributeList", - "attributeId": 0x0000FFFB, - "type": "int", - "reportable": True, - }, - 0x0000FFFC: { - "attributeName": "FeatureMap", - "attributeId": 0x0000FFFC, - "type": "int", - "reportable": True, - }, - 0x0000FFFD: { - "attributeName": "ClusterRevision", - "attributeId": 0x0000FFFD, - "type": "int", - "reportable": True, - }, - }, - } _ON_OFF_CLUSTER_INFO = { "clusterName": "OnOff", "clusterId": 0x00000006, @@ -5967,6 +5787,186 @@ class ChipClusters: }, }, } + _SCENES_MANAGEMENT_CLUSTER_INFO = { + "clusterName": "ScenesManagement", + "clusterId": 0x00000062, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "AddScene", + "args": { + "groupID": "int", + "sceneID": "int", + "transitionTime": "int", + "sceneName": "str", + "extensionFieldSets": "ExtensionFieldSet", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ViewScene", + "args": { + "groupID": "int", + "sceneID": "int", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "RemoveScene", + "args": { + "groupID": "int", + "sceneID": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "RemoveAllScenes", + "args": { + "groupID": "int", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "StoreScene", + "args": { + "groupID": "int", + "sceneID": "int", + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "RecallScene", + "args": { + "groupID": "int", + "sceneID": "int", + "transitionTime": "int", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "GetSceneMembership", + "args": { + "groupID": "int", + }, + }, + 0x00000040: { + "commandId": 0x00000040, + "commandName": "EnhancedAddScene", + "args": { + "groupID": "int", + "sceneID": "int", + "transitionTime": "int", + "sceneName": "str", + "extensionFieldSets": "ExtensionFieldSet", + }, + }, + 0x00000041: { + "commandId": 0x00000041, + "commandName": "EnhancedViewScene", + "args": { + "groupID": "int", + "sceneID": "int", + }, + }, + 0x00000042: { + "commandId": 0x00000042, + "commandName": "CopyScene", + "args": { + "mode": "int", + "groupIdentifierFrom": "int", + "sceneIdentifierFrom": "int", + "groupIdentifierTo": "int", + "sceneIdentifierTo": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "SceneCount", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "CurrentScene", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "CurrentGroup", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "SceneValid", + "attributeId": 0x00000003, + "type": "bool", + "reportable": True, + }, + 0x00000004: { + "attributeName": "NameSupport", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "LastConfiguredBy", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + }, + 0x00000006: { + "attributeName": "SceneTableSize", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "FabricSceneInfo", + "attributeId": 0x00000007, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _HEPA_FILTER_MONITORING_CLUSTER_INFO = { "clusterName": "HepaFilterMonitoring", "clusterId": 0x00000071, @@ -14106,7 +14106,6 @@ class ChipClusters: _CLUSTER_ID_DICT = { 0x00000003: _IDENTIFY_CLUSTER_INFO, 0x00000004: _GROUPS_CLUSTER_INFO, - 0x00000005: _SCENES_CLUSTER_INFO, 0x00000006: _ON_OFF_CLUSTER_INFO, 0x00000007: _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, 0x00000008: _LEVEL_CONTROL_CLUSTER_INFO, @@ -14165,6 +14164,7 @@ class ChipClusters: 0x0000005F: _MICROWAVE_OVEN_CONTROL_CLUSTER_INFO, 0x00000060: _OPERATIONAL_STATE_CLUSTER_INFO, 0x00000061: _RVC_OPERATIONAL_STATE_CLUSTER_INFO, + 0x00000062: _SCENES_MANAGEMENT_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, 0x00000072: _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, 0x00000080: _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, @@ -14222,7 +14222,6 @@ class ChipClusters: _CLUSTER_NAME_DICT = { "Identify": _IDENTIFY_CLUSTER_INFO, "Groups": _GROUPS_CLUSTER_INFO, - "Scenes": _SCENES_CLUSTER_INFO, "OnOff": _ON_OFF_CLUSTER_INFO, "OnOffSwitchConfiguration": _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, "LevelControl": _LEVEL_CONTROL_CLUSTER_INFO, @@ -14281,6 +14280,7 @@ class ChipClusters: "MicrowaveOvenControl": _MICROWAVE_OVEN_CONTROL_CLUSTER_INFO, "OperationalState": _OPERATIONAL_STATE_CLUSTER_INFO, "RvcOperationalState": _RVC_OPERATIONAL_STATE_CLUSTER_INFO, + "ScenesManagement": _SCENES_MANAGEMENT_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, "ActivatedCarbonFilterMonitoring": _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, "BooleanStateConfiguration": _BOOLEAN_STATE_CONFIGURATION_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c5f991fb7cdb18..de895fb0dbdbb1 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -583,21 +583,18 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class Scenes(Cluster): - id: typing.ClassVar[int] = 0x00000005 +class OnOff(Cluster): + id: typing.ClassVar[int] = 0x00000006 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="nameSupport", Tag=0x00000004, Type=uint), - ClusterObjectFieldDescriptor(Label="lastConfiguredBy", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sceneTableSize", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricSceneInfo", Tag=0x00000007, Type=typing.List[Scenes.Structs.SceneInfoStruct]), + ClusterObjectFieldDescriptor(Label="onOff", Tag=0x00000000, Type=bool), + ClusterObjectFieldDescriptor(Label="globalSceneControl", Tag=0x00004000, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="onTime", Tag=0x00004001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="offWaitTime", Tag=0x00004002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startUpOnOff", Tag=0x00004003, Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -606,14 +603,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - sceneCount: 'typing.Optional[uint]' = None - currentScene: 'typing.Optional[uint]' = None - currentGroup: 'typing.Optional[uint]' = None - sceneValid: 'typing.Optional[bool]' = None - nameSupport: 'uint' = None - lastConfiguredBy: 'typing.Union[None, Nullable, uint]' = None - sceneTableSize: 'uint' = None - fabricSceneInfo: 'typing.List[Scenes.Structs.SceneInfoStruct]' = None + onOff: 'bool' = None + globalSceneControl: 'typing.Optional[bool]' = None + onTime: 'typing.Optional[uint]' = None + offWaitTime: 'typing.Optional[uint]' = None + startUpOnOff: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -621,530 +615,298 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Bitmaps: - class CopyModeBitmap(IntFlag): - kCopyAllScenes = 0x1 - - class Feature(IntFlag): - kSceneNames = 0x1 - kExplicit = 0x2 - kTableSize = 0x4 - kFabricScenes = 0x8 - - class NameSupportBitmap(IntFlag): - kSceneNames = 0x80 - - class Structs: - @dataclass - class AttributeValuePair(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="attributeID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="attributeValue", Tag=1, Type=uint), - ]) + class Enums: + class DelayedAllOffEffectVariantEnum(MatterIntEnum): + kDelayedOffFastFade = 0x00 + kNoFade = 0x01 + kDelayedOffSlowFade = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, - attributeID: 'uint' = 0 - attributeValue: 'uint' = 0 + class DyingLightEffectVariantEnum(MatterIntEnum): + kDyingLightFadeOff = 0x00 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, - @dataclass - class ExtensionFieldSet(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="clusterID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="attributeValueList", Tag=1, Type=typing.List[Scenes.Structs.AttributeValuePair]), - ]) + class EffectIdentifierEnum(MatterIntEnum): + kDelayedAllOff = 0x00 + kDyingLight = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, - clusterID: 'uint' = 0 - attributeValueList: 'typing.List[Scenes.Structs.AttributeValuePair]' = field(default_factory=lambda: []) + class StartUpOnOffEnum(MatterIntEnum): + kOff = 0x00 + kOn = 0x01 + kToggle = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, - @dataclass - class SceneInfoStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="currentScene", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="currentGroup", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneValid", Tag=3, Type=bool), - ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), - ]) + class Bitmaps: + class Feature(IntFlag): + kLighting = 0x1 + kDeadFrontBehavior = 0x2 + kOffOnly = 0x4 - sceneCount: 'uint' = 0 - currentScene: 'uint' = 0 - currentGroup: 'uint' = 0 - sceneValid: 'bool' = False - remainingCapacity: 'uint' = 0 - fabricIndex: 'uint' = 0 + class OnOffControlBitmap(IntFlag): + kAcceptOnlyWhenOn = 0x1 class Commands: @dataclass - class AddScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 + class Off(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'AddSceneResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneName", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=4, Type=typing.List[Scenes.Structs.ExtensionFieldSet]), - ]) - - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'uint' = 0 - sceneName: 'str' = "" - extensionFieldSets: 'typing.List[Scenes.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) - - @dataclass - class AddSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - @dataclass - class ViewScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 + class On(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ViewSceneResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - @dataclass - class ViewSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False + class Toggle(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="sceneName", Tag=4, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=5, Type=typing.Optional[typing.List[Scenes.Structs.ExtensionFieldSet]]), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'typing.Optional[uint]' = None - sceneName: 'typing.Optional[str]' = None - extensionFieldSets: 'typing.Optional[typing.List[Scenes.Structs.ExtensionFieldSet]]' = None - @dataclass - class RemoveScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000002 + class OffWithEffect(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 + command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'RemoveSceneResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="effectIdentifier", Tag=0, Type=OnOff.Enums.EffectIdentifierEnum), + ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=uint), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + effectIdentifier: 'OnOff.Enums.EffectIdentifierEnum' = 0 + effectVariant: 'uint' = 0 @dataclass - class RemoveSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = False + class OnWithRecallGlobalScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 + command_id: typing.ClassVar[int] = 0x00000041 + is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - @dataclass - class RemoveAllScenes(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000003 + class OnWithTimedOff(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000006 + command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'RemoveAllScenesResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="onOffControl", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="onTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="offWaitTime", Tag=2, Type=uint), ]) - groupID: 'uint' = 0 + onOffControl: 'uint' = 0 + onTime: 'uint' = 0 + offWaitTime: 'uint' = 0 + class Attributes: @dataclass - class RemoveAllScenesResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class OnOff(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000006 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - status: 'uint' = 0 - groupID: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=bool) + + value: 'bool' = False @dataclass - class StoreScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'StoreSceneResponse' + class GlobalSceneControl(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000006 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), - ]) - - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - - @dataclass - class StoreSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x00004000 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + value: 'typing.Optional[bool]' = None @dataclass - class RecallScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class OnTime(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[None, Nullable, uint]), - ]) - - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class GetSceneMembership(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetSceneMembershipResponse' + def cluster_id(cls) -> int: + return 0x00000006 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ]) - - groupID: 'uint' = 0 - - @dataclass - class GetSceneMembershipResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x00004001 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="capacity", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="groupID", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneList", Tag=3, Type=typing.Optional[typing.List[uint]]), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - status: 'uint' = 0 - capacity: 'typing.Union[Nullable, uint]' = NullValue - groupID: 'uint' = 0 - sceneList: 'typing.Optional[typing.List[uint]]' = None + value: 'typing.Optional[uint]' = None @dataclass - class EnhancedAddScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000040 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'EnhancedAddSceneResponse' - + class OffWaitTime(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneName", Tag=3, Type=str), - ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=4, Type=typing.List[Scenes.Structs.ExtensionFieldSet]), - ]) - - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'uint' = 0 - sceneName: 'str' = "" - extensionFieldSets: 'typing.List[Scenes.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) - - @dataclass - class EnhancedAddSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000040 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + def cluster_id(cls) -> int: + return 0x00000006 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), - ]) - - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - - @dataclass - class EnhancedViewScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000041 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'EnhancedViewSceneResponse' + def attribute_id(cls) -> int: + return 0x00004002 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class EnhancedViewSceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000041 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - + class StartUpOnOff(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="sceneName", Tag=4, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=5, Type=typing.Optional[typing.List[Scenes.Structs.ExtensionFieldSet]]), - ]) - - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'typing.Optional[uint]' = None - sceneName: 'typing.Optional[str]' = None - extensionFieldSets: 'typing.Optional[typing.List[Scenes.Structs.ExtensionFieldSet]]' = None - - @dataclass - class CopyScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000042 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'CopySceneResponse' + def cluster_id(cls) -> int: + return 0x00000006 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdentifierFrom", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdentifierTo", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdentifierTo", Tag=4, Type=uint), - ]) - - mode: 'uint' = 0 - groupIdentifierFrom: 'uint' = 0 - sceneIdentifierFrom: 'uint' = 0 - groupIdentifierTo: 'uint' = 0 - sceneIdentifierTo: 'uint' = 0 - - @dataclass - class CopySceneResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000005 - command_id: typing.ClassVar[int] = 0x00000042 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x00004003 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdentifierFrom", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]) - status: 'uint' = 0 - groupIdentifierFrom: 'uint' = 0 - sceneIdentifierFrom: 'uint' = 0 + value: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None - class Attributes: @dataclass - class SceneCount(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class CurrentScene(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class CurrentGroup(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class SceneValid(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class NameSupport(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -1153,30 +915,59 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class LastConfiguredBy(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000006 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 + + +@dataclass +class OnOffSwitchConfiguration(Cluster): + id: typing.ClassVar[int] = 0x00000007 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="switchType", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="switchActions", Tag=0x00000010, Type=uint), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + switchType: 'uint' = None + switchActions: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + class Attributes: @dataclass - class SceneTableSize(ClusterAttributeDescriptor): + class SwitchType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -1185,26 +976,26 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class FabricSceneInfo(ClusterAttributeDescriptor): + class SwitchActions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Scenes.Structs.SceneInfoStruct]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[Scenes.Structs.SceneInfoStruct]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1220,7 +1011,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1236,7 +1027,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1252,7 +1043,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1268,7 +1059,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1284,7 +1075,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1298,18 +1089,27 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class OnOff(Cluster): - id: typing.ClassVar[int] = 0x00000006 +class LevelControl(Cluster): + id: typing.ClassVar[int] = 0x00000008 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="onOff", Tag=0x00000000, Type=bool), - ClusterObjectFieldDescriptor(Label="globalSceneControl", Tag=0x00004000, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="onTime", Tag=0x00004001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="offWaitTime", Tag=0x00004002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startUpOnOff", Tag=0x00004003, Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]), + ClusterObjectFieldDescriptor(Label="currentLevel", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="remainingTime", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minLevel", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxLevel", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentFrequency", Tag=0x00000004, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minFrequency", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxFrequency", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="options", Tag=0x0000000F, Type=uint), + ClusterObjectFieldDescriptor(Label="onOffTransitionTime", Tag=0x00000010, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="onLevel", Tag=0x00000011, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onTransitionTime", Tag=0x00000012, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="offTransitionTime", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="defaultMoveRate", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -1318,11 +1118,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - onOff: 'bool' = None - globalSceneControl: 'typing.Optional[bool]' = None - onTime: 'typing.Optional[uint]' = None - offWaitTime: 'typing.Optional[uint]' = None - startUpOnOff: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None + currentLevel: 'typing.Union[Nullable, uint]' = None + remainingTime: 'typing.Optional[uint]' = None + minLevel: 'typing.Optional[uint]' = None + maxLevel: 'typing.Optional[uint]' = None + currentFrequency: 'typing.Optional[uint]' = None + minFrequency: 'typing.Optional[uint]' = None + maxFrequency: 'typing.Optional[uint]' = None + options: 'uint' = None + onOffTransitionTime: 'typing.Optional[uint]' = None + onLevel: 'typing.Union[Nullable, uint]' = None + onTransitionTime: 'typing.Union[None, Nullable, uint]' = None + offTransitionTime: 'typing.Union[None, Nullable, uint]' = None + defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None + startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -1331,56 +1140,38 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class DelayedAllOffEffectVariantEnum(MatterIntEnum): - kDelayedOffFastFade = 0x00 - kNoFade = 0x01 - kDelayedOffSlowFade = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class DyingLightEffectVariantEnum(MatterIntEnum): - kDyingLightFadeOff = 0x00 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, - - class EffectIdentifierEnum(MatterIntEnum): - kDelayedAllOff = 0x00 - kDyingLight = 0x01 + class MoveModeEnum(MatterIntEnum): + kUp = 0x00 + kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, - class StartUpOnOffEnum(MatterIntEnum): - kOff = 0x00 - kOn = 0x01 - kToggle = 0x02 + class StepModeEnum(MatterIntEnum): + kUp = 0x00 + kDown = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 2, class Bitmaps: class Feature(IntFlag): - kLighting = 0x1 - kDeadFrontBehavior = 0x2 - kOffOnly = 0x4 + kOnOff = 0x1 + kLighting = 0x2 + kFrequency = 0x4 - class OnOffControlBitmap(IntFlag): - kAcceptOnlyWhenOn = 0x1 + class OptionsBitmap(IntFlag): + kExecuteIfOff = 0x1 + kCoupleColorTempToLevel = 0x2 class Commands: @dataclass - class Off(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 + class MoveToLevel(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1389,11 +1180,20 @@ class Off(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) + level: 'uint' = 0 + transitionTime: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + @dataclass - class On(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 + class Move(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1402,11 +1202,20 @@ class On(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) + moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 + rate: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + @dataclass - class Toggle(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 + class Step(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1415,12 +1224,23 @@ class Toggle(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) + stepMode: 'LevelControl.Enums.StepModeEnum' = 0 + stepSize: 'uint' = 0 + transitionTime: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + @dataclass - class OffWithEffect(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 - command_id: typing.ClassVar[int] = 0x00000040 + class Stop(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1428,17 +1248,17 @@ class OffWithEffect(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="effectIdentifier", Tag=0, Type=OnOff.Enums.EffectIdentifierEnum), - ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - effectIdentifier: 'OnOff.Enums.EffectIdentifierEnum' = 0 - effectVariant: 'uint' = 0 + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class OnWithRecallGlobalScene(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 - command_id: typing.ClassVar[int] = 0x00000041 + class MoveToLevelWithOnOff(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1446,12 +1266,21 @@ class OnWithRecallGlobalScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) + level: 'uint' = 0 + transitionTime: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + @dataclass - class OnWithTimedOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000006 - command_id: typing.ClassVar[int] = 0x00000042 + class MoveWithOnOff(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -1459,57 +1288,101 @@ class OnWithTimedOff(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="onOffControl", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="onTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="offWaitTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), + ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - onOffControl: 'uint' = 0 - onTime: 'uint' = 0 - offWaitTime: 'uint' = 0 + moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 + rate: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 - class Attributes: @dataclass - class OnOff(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000006 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + class StepWithOnOff(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) - - value: 'bool' = False + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), + ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), + ]) + + stepMode: 'LevelControl.Enums.StepModeEnum' = 0 + stepSize: 'uint' = 0 + transitionTime: 'typing.Union[Nullable, uint]' = NullValue + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 @dataclass - class GlobalSceneControl(ClusterAttributeDescriptor): + class StopWithOnOff(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), + ]) + + optionsMask: 'uint' = 0 + optionsOverride: 'uint' = 0 + + @dataclass + class MoveToClosestFrequency(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000008 + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="frequency", Tag=0, Type=uint), + ]) + + frequency: 'uint' = 0 + + class Attributes: + @dataclass + class CurrentLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004000 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class OnTime(ClusterAttributeDescriptor): + class RemainingTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004001 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -1518,14 +1391,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class OffWaitTime(ClusterAttributeDescriptor): + class MinLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004002 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -1534,183 +1407,186 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class StartUpOnOff(ClusterAttributeDescriptor): + class MaxLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00004003 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None + value: 'typing.Optional[uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class CurrentFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class MinFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class MaxFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: return 0x00000006 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class Options(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000008 + @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x0000000F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass - class AttributeList(ClusterAttributeDescriptor): + class OnOffTransitionTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class OnLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class OnTransitionTime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000006 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None + @dataclass + class OffTransitionTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000008 -@dataclass -class OnOffSwitchConfiguration(Cluster): - id: typing.ClassVar[int] = 0x00000007 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000013 - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="switchType", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="switchActions", Tag=0x00000010, Type=uint), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - switchType: 'uint' = None - switchActions: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Union[None, Nullable, uint]' = None - class Attributes: @dataclass - class SwitchType(ClusterAttributeDescriptor): + class DefaultMoveRate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class SwitchActions(ClusterAttributeDescriptor): + class StartUpCurrentLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x00004000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'uint' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1726,7 +1602,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1742,7 +1618,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1758,7 +1634,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1774,7 +1650,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1790,7 +1666,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000007 + return 0x00000008 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -1804,27 +1680,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class LevelControl(Cluster): - id: typing.ClassVar[int] = 0x00000008 +class BinaryInputBasic(Cluster): + id: typing.ClassVar[int] = 0x0000000F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="currentLevel", Tag=0x00000000, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="remainingTime", Tag=0x00000001, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minLevel", Tag=0x00000002, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxLevel", Tag=0x00000003, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="currentFrequency", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="minFrequency", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="maxFrequency", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="options", Tag=0x0000000F, Type=uint), - ClusterObjectFieldDescriptor(Label="onOffTransitionTime", Tag=0x00000010, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="onLevel", Tag=0x00000011, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onTransitionTime", Tag=0x00000012, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="offTransitionTime", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="defaultMoveRate", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="activeText", Tag=0x00000004, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="description", Tag=0x0000001C, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="inactiveText", Tag=0x0000002E, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="outOfService", Tag=0x00000051, Type=bool), + ClusterObjectFieldDescriptor(Label="polarity", Tag=0x00000054, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="presentValue", Tag=0x00000055, Type=bool), + ClusterObjectFieldDescriptor(Label="reliability", Tag=0x00000067, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="statusFlags", Tag=0x0000006F, Type=uint), + ClusterObjectFieldDescriptor(Label="applicationType", Tag=0x00000100, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -1833,20 +1704,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentLevel: 'typing.Union[Nullable, uint]' = None - remainingTime: 'typing.Optional[uint]' = None - minLevel: 'typing.Optional[uint]' = None - maxLevel: 'typing.Optional[uint]' = None - currentFrequency: 'typing.Optional[uint]' = None - minFrequency: 'typing.Optional[uint]' = None - maxFrequency: 'typing.Optional[uint]' = None - options: 'uint' = None - onOffTransitionTime: 'typing.Optional[uint]' = None - onLevel: 'typing.Union[Nullable, uint]' = None - onTransitionTime: 'typing.Union[None, Nullable, uint]' = None - offTransitionTime: 'typing.Union[None, Nullable, uint]' = None - defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None - startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None + activeText: 'typing.Optional[str]' = None + description: 'typing.Optional[str]' = None + inactiveText: 'typing.Optional[str]' = None + outOfService: 'bool' = None + polarity: 'typing.Optional[uint]' = None + presentValue: 'bool' = None + reliability: 'typing.Optional[uint]' = None + statusFlags: 'uint' = None + applicationType: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -1854,250 +1720,80 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class MoveModeEnum(MatterIntEnum): - kUp = 0x00 - kDown = 0x01 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class StepModeEnum(MatterIntEnum): - kUp = 0x00 - kDown = 0x01 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class Bitmaps: - class Feature(IntFlag): - kOnOff = 0x1 - kLighting = 0x2 - kFrequency = 0x4 - - class OptionsBitmap(IntFlag): - kExecuteIfOff = 0x1 - kCoupleColorTempToLevel = 0x2 - - class Commands: + class Attributes: @dataclass - class MoveToLevel(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class ActiveText(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) - - level: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class Move(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def cluster_id(cls) -> int: + return 0x0000000F @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) - - moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 - rate: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class Step(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x00000004 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - stepMode: 'LevelControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + value: 'typing.Optional[str]' = None @dataclass - class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), - ]) - - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class MoveToLevelWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def cluster_id(cls) -> int: + return 0x0000000F @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) - - level: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class MoveWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x0000001C @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="moveMode", Tag=0, Type=LevelControl.Enums.MoveModeEnum), - ClusterObjectFieldDescriptor(Label="rate", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 - rate: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + value: 'typing.Optional[str]' = None @dataclass - class StepWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class InactiveText(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="stepMode", Tag=0, Type=LevelControl.Enums.StepModeEnum), - ClusterObjectFieldDescriptor(Label="stepSize", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), - ]) - - stepMode: 'LevelControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class StopWithOnOff(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000007 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def cluster_id(cls) -> int: + return 0x0000000F @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="optionsMask", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), - ]) - - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 - - @dataclass - class MoveToClosestFrequency(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000008 - command_id: typing.ClassVar[int] = 0x00000008 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x0000002E @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="frequency", Tag=0, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - frequency: 'uint' = 0 + value: 'typing.Optional[str]' = None - class Attributes: @dataclass - class CurrentLevel(ClusterAttributeDescriptor): + class OutOfService(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000051 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=bool) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'bool' = False @dataclass - class RemainingTime(ClusterAttributeDescriptor): + class Polarity(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000054 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -2106,30 +1802,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class MinLevel(ClusterAttributeDescriptor): + class PresentValue(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000055 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=bool) - value: 'typing.Optional[uint]' = None + value: 'bool' = False @dataclass - class MaxLevel(ClusterAttributeDescriptor): + class Reliability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000067 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -2138,30 +1834,30 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class CurrentFrequency(ClusterAttributeDescriptor): + class StatusFlags(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000006F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[uint]' = None + value: 'uint' = 0 @dataclass - class MinFrequency(ClusterAttributeDescriptor): + class ApplicationType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000100 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -2170,138 +1866,131 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class MaxFrequency(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Options(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: return 0x0000000F - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class OnOffTransitionTime(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000008 - @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OnLevel(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OnTransitionTime(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OffTransitionTime(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 @dataclass - class DefaultMoveRate(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000000F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'uint' = 0 - @dataclass - class StartUpCurrentLevel(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000008 - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00004000 +@dataclass +class PulseWidthModulation(Cluster): + id: typing.ClassVar[int] = 0x0000001C - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) - value: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2317,7 +2006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2333,7 +2022,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2349,7 +2038,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2365,7 +2054,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2381,7 +2070,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000008 + return 0x0000001C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2395,22 +2084,18 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class BinaryInputBasic(Cluster): - id: typing.ClassVar[int] = 0x0000000F +class Descriptor(Cluster): + id: typing.ClassVar[int] = 0x0000001D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="activeText", Tag=0x00000004, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="description", Tag=0x0000001C, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="inactiveText", Tag=0x0000002E, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="outOfService", Tag=0x00000051, Type=bool), - ClusterObjectFieldDescriptor(Label="polarity", Tag=0x00000054, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="presentValue", Tag=0x00000055, Type=bool), - ClusterObjectFieldDescriptor(Label="reliability", Tag=0x00000067, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="statusFlags", Tag=0x0000006F, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationType", Tag=0x00000100, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="deviceTypeList", Tag=0x00000000, Type=typing.List[Descriptor.Structs.DeviceTypeStruct]), + ClusterObjectFieldDescriptor(Label="serverList", Tag=0x00000001, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="clientList", Tag=0x00000002, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="partsList", Tag=0x00000003, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="tagList", Tag=0x00000004, Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -2419,15 +2104,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - activeText: 'typing.Optional[str]' = None - description: 'typing.Optional[str]' = None - inactiveText: 'typing.Optional[str]' = None - outOfService: 'bool' = None - polarity: 'typing.Optional[uint]' = None - presentValue: 'bool' = None - reliability: 'typing.Optional[uint]' = None - statusFlags: 'uint' = None - applicationType: 'typing.Optional[uint]' = None + deviceTypeList: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = None + serverList: 'typing.List[uint]' = None + clientList: 'typing.List[uint]' = None + partsList: 'typing.List[uint]' = None + tagList: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -2435,156 +2116,127 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Attributes: + class Bitmaps: + class Feature(IntFlag): + kTagList = 0x1 + + class Structs: @dataclass - class ActiveText(ClusterAttributeDescriptor): + class DeviceTypeStruct(ClusterObject): @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="deviceType", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="revision", Tag=1, Type=uint), + ]) - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 + deviceType: 'uint' = 0 + revision: 'uint' = 0 + @dataclass + class SemanticTagStruct(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="namespaceID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="tag", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="label", Tag=3, Type=typing.Union[None, Nullable, str]), + ]) - value: 'typing.Optional[str]' = None + mfgCode: 'typing.Union[Nullable, uint]' = NullValue + namespaceID: 'uint' = 0 + tag: 'uint' = 0 + label: 'typing.Union[None, Nullable, str]' = None + class Attributes: @dataclass - class Description(ClusterAttributeDescriptor): + class DeviceTypeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000001C + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[Descriptor.Structs.DeviceTypeStruct]) - value: 'typing.Optional[str]' = None + value: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = field(default_factory=lambda: []) @dataclass - class InactiveText(ClusterAttributeDescriptor): + class ServerList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000002E + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[str]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class OutOfService(ClusterAttributeDescriptor): + class ClientList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000051 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'bool' = False + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Polarity(ClusterAttributeDescriptor): + class PartsList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000054 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PresentValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000055 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) - - value: 'bool' = False - - @dataclass - class Reliability(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000067 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class StatusFlags(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000006F + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'uint' = 0 + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ApplicationType(ClusterAttributeDescriptor): + class TagList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000100 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2600,7 +2252,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2616,7 +2268,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2632,7 +2284,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2648,7 +2300,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2664,7 +2316,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000000F + return 0x0000001D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2678,13 +2330,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class PulseWidthModulation(Cluster): - id: typing.ClassVar[int] = 0x0000001C +class Binding(Cluster): + id: typing.ClassVar[int] = 0x0000001E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="binding", Tag=0x00000000, Type=typing.List[Binding.Structs.TargetStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -2693,6 +2346,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) + binding: 'typing.List[Binding.Structs.TargetStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -2700,12 +2354,48 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Structs: + @dataclass + class TargetStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="node", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="group", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="cluster", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + node: 'typing.Optional[uint]' = None + group: 'typing.Optional[uint]' = None + endpoint: 'typing.Optional[uint]' = None + cluster: 'typing.Optional[uint]' = None + fabricIndex: 'uint' = 0 + class Attributes: + @dataclass + class Binding(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000001E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[Binding.Structs.TargetStruct]) + + value: 'typing.List[Binding.Structs.TargetStruct]' = field(default_factory=lambda: []) + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2721,7 +2411,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2737,7 +2427,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2753,7 +2443,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2769,7 +2459,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2785,7 +2475,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001C + return 0x0000001E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2799,18 +2489,18 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class Descriptor(Cluster): - id: typing.ClassVar[int] = 0x0000001D +class AccessControl(Cluster): + id: typing.ClassVar[int] = 0x0000001F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="deviceTypeList", Tag=0x00000000, Type=typing.List[Descriptor.Structs.DeviceTypeStruct]), - ClusterObjectFieldDescriptor(Label="serverList", Tag=0x00000001, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="clientList", Tag=0x00000002, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="partsList", Tag=0x00000003, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="tagList", Tag=0x00000004, Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]), + ClusterObjectFieldDescriptor(Label="acl", Tag=0x00000000, Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]), + ClusterObjectFieldDescriptor(Label="extension", Tag=0x00000001, Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]), + ClusterObjectFieldDescriptor(Label="subjectsPerAccessControlEntry", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="targetsPerAccessControlEntry", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="accessControlEntriesPerFabric", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -2819,11 +2509,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - deviceTypeList: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = None - serverList: 'typing.List[uint]' = None - clientList: 'typing.List[uint]' = None - partsList: 'typing.List[uint]' = None - tagList: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None + acl: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = None + extension: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None + subjectsPerAccessControlEntry: 'uint' = None + targetsPerAccessControlEntry: 'uint' = None + accessControlEntriesPerFabric: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -2831,47 +2521,93 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Bitmaps: - class Feature(IntFlag): - kTagList = 0x1 + class Enums: + class AccessControlEntryAuthModeEnum(MatterIntEnum): + kPase = 0x01 + kCase = 0x02 + kGroup = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class AccessControlEntryPrivilegeEnum(MatterIntEnum): + kView = 0x01 + kProxyView = 0x02 + kOperate = 0x03 + kManage = 0x04 + kAdminister = 0x05 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class ChangeTypeEnum(MatterIntEnum): + kChanged = 0x00 + kAdded = 0x01 + kRemoved = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, class Structs: @dataclass - class DeviceTypeStruct(ClusterObject): + class AccessControlTargetStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="deviceType", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="revision", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="cluster", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="deviceType", Tag=2, Type=typing.Union[Nullable, uint]), ]) - deviceType: 'uint' = 0 - revision: 'uint' = 0 + cluster: 'typing.Union[Nullable, uint]' = NullValue + endpoint: 'typing.Union[Nullable, uint]' = NullValue + deviceType: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class SemanticTagStruct(ClusterObject): + class AccessControlEntryStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="namespaceID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="tag", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="label", Tag=3, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="privilege", Tag=1, Type=AccessControl.Enums.AccessControlEntryPrivilegeEnum), + ClusterObjectFieldDescriptor(Label="authMode", Tag=2, Type=AccessControl.Enums.AccessControlEntryAuthModeEnum), + ClusterObjectFieldDescriptor(Label="subjects", Tag=3, Type=typing.Union[Nullable, typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="targets", Tag=4, Type=typing.Union[Nullable, typing.List[AccessControl.Structs.AccessControlTargetStruct]]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - mfgCode: 'typing.Union[Nullable, uint]' = NullValue - namespaceID: 'uint' = 0 - tag: 'uint' = 0 - label: 'typing.Union[None, Nullable, str]' = None + privilege: 'AccessControl.Enums.AccessControlEntryPrivilegeEnum' = 0 + authMode: 'AccessControl.Enums.AccessControlEntryAuthModeEnum' = 0 + subjects: 'typing.Union[Nullable, typing.List[uint]]' = NullValue + targets: 'typing.Union[Nullable, typing.List[AccessControl.Structs.AccessControlTargetStruct]]' = NullValue + fabricIndex: 'uint' = 0 + + @dataclass + class AccessControlExtensionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + data: 'bytes' = b"" + fabricIndex: 'uint' = 0 class Attributes: @dataclass - class DeviceTypeList(ClusterAttributeDescriptor): + class Acl(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2879,15 +2615,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Descriptor.Structs.DeviceTypeStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]) - value: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = field(default_factory=lambda: []) + value: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = field(default_factory=lambda: []) @dataclass - class ServerList(ClusterAttributeDescriptor): + class Extension(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2895,15 +2631,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None @dataclass - class ClientList(ClusterAttributeDescriptor): + class SubjectsPerAccessControlEntry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2911,15 +2647,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass - class PartsList(ClusterAttributeDescriptor): + class TargetsPerAccessControlEntry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2927,15 +2663,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass - class TagList(ClusterAttributeDescriptor): + class AccessControlEntriesPerFabric(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2943,15 +2679,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None + value: 'uint' = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2967,7 +2703,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2983,7 +2719,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -2999,7 +2735,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3015,7 +2751,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3031,7 +2767,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001D + return 0x0000001F @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3043,179 +2779,73 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class AccessControlEntryChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000001F -@dataclass -class Binding(Cluster): - id: typing.ClassVar[int] = 0x0000001E - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="binding", Tag=0x00000000, Type=typing.List[Binding.Structs.TargetStruct]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - binding: 'typing.List[Binding.Structs.TargetStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 - class Structs: - @dataclass - class TargetStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="node", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="group", Tag=2, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="cluster", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - node: 'typing.Optional[uint]' = None - group: 'typing.Optional[uint]' = None - endpoint: 'typing.Optional[uint]' = None - cluster: 'typing.Optional[uint]' = None + adminNodeID: 'typing.Union[Nullable, uint]' = NullValue + adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue + changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 + latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]' = NullValue fabricIndex: 'uint' = 0 - class Attributes: - @dataclass - class Binding(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Binding.Structs.TargetStruct]) - - value: 'typing.List[Binding.Structs.TargetStruct]' = field(default_factory=lambda: []) - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class AttributeList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFB - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class FeatureMap(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFC - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class AccessControlExtensionChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001E + return 0x0000001F @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFD + def event_id(cls) -> int: + return 0x00000001 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), + ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) - value: 'uint' = 0 + adminNodeID: 'typing.Union[Nullable, uint]' = NullValue + adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue + changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 + latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]' = NullValue + fabricIndex: 'uint' = 0 @dataclass -class AccessControl(Cluster): - id: typing.ClassVar[int] = 0x0000001F +class Actions(Cluster): + id: typing.ClassVar[int] = 0x00000025 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="acl", Tag=0x00000000, Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]), - ClusterObjectFieldDescriptor(Label="extension", Tag=0x00000001, Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]), - ClusterObjectFieldDescriptor(Label="subjectsPerAccessControlEntry", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="targetsPerAccessControlEntry", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="accessControlEntriesPerFabric", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="actionList", Tag=0x00000000, Type=typing.List[Actions.Structs.ActionStruct]), + ClusterObjectFieldDescriptor(Label="endpointLists", Tag=0x00000001, Type=typing.List[Actions.Structs.EndpointListStruct]), + ClusterObjectFieldDescriptor(Label="setupURL", Tag=0x00000002, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -3224,11 +2854,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acl: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = None - extension: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None - subjectsPerAccessControlEntry: 'uint' = None - targetsPerAccessControlEntry: 'uint' = None - accessControlEntriesPerFabric: 'uint' = None + actionList: 'typing.List[Actions.Structs.ActionStruct]' = None + endpointLists: 'typing.List[Actions.Structs.EndpointListStruct]' = None + setupURL: 'typing.Optional[str]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -3237,188 +2865,401 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class AccessControlEntryAuthModeEnum(MatterIntEnum): - kPase = 0x01 - kCase = 0x02 - kGroup = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 0, - - class AccessControlEntryPrivilegeEnum(MatterIntEnum): - kView = 0x01 - kProxyView = 0x02 - kOperate = 0x03 - kManage = 0x04 - kAdminister = 0x05 + class ActionErrorEnum(MatterIntEnum): + kUnknown = 0x00 + kInterrupted = 0x01 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 2, - class ChangeTypeEnum(MatterIntEnum): - kChanged = 0x00 - kAdded = 0x01 - kRemoved = 0x02 + class ActionStateEnum(MatterIntEnum): + kInactive = 0x00 + kActive = 0x01 + kPaused = 0x02 + kDisabled = 0x03 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 4, - class Structs: + class ActionTypeEnum(MatterIntEnum): + kOther = 0x00 + kScene = 0x01 + kSequence = 0x02 + kAutomation = 0x03 + kException = 0x04 + kNotification = 0x05 + kAlarm = 0x06 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, + + class EndpointListTypeEnum(MatterIntEnum): + kOther = 0x00 + kRoom = 0x01 + kZone = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class Bitmaps: + class CommandBits(IntFlag): + kInstantAction = 0x1 + kInstantActionWithTransition = 0x2 + kStartAction = 0x4 + kStartActionWithDuration = 0x8 + kStopAction = 0x10 + kPauseAction = 0x20 + kPauseActionWithDuration = 0x40 + kResumeAction = 0x80 + kEnableAction = 0x100 + kEnableActionWithDuration = 0x200 + kDisableAction = 0x400 + kDisableActionWithDuration = 0x800 + + class Structs: @dataclass - class AccessControlTargetStruct(ClusterObject): + class ActionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="cluster", Tag=0, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="deviceType", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=Actions.Enums.ActionTypeEnum), + ClusterObjectFieldDescriptor(Label="endpointListID", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="supportedCommands", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=5, Type=Actions.Enums.ActionStateEnum), ]) - cluster: 'typing.Union[Nullable, uint]' = NullValue - endpoint: 'typing.Union[Nullable, uint]' = NullValue - deviceType: 'typing.Union[Nullable, uint]' = NullValue + actionID: 'uint' = 0 + name: 'str' = "" + type: 'Actions.Enums.ActionTypeEnum' = 0 + endpointListID: 'uint' = 0 + supportedCommands: 'uint' = 0 + state: 'Actions.Enums.ActionStateEnum' = 0 @dataclass - class AccessControlEntryStruct(ClusterObject): + class EndpointListStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="privilege", Tag=1, Type=AccessControl.Enums.AccessControlEntryPrivilegeEnum), - ClusterObjectFieldDescriptor(Label="authMode", Tag=2, Type=AccessControl.Enums.AccessControlEntryAuthModeEnum), - ClusterObjectFieldDescriptor(Label="subjects", Tag=3, Type=typing.Union[Nullable, typing.List[uint]]), - ClusterObjectFieldDescriptor(Label="targets", Tag=4, Type=typing.Union[Nullable, typing.List[AccessControl.Structs.AccessControlTargetStruct]]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="endpointListID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=Actions.Enums.EndpointListTypeEnum), + ClusterObjectFieldDescriptor(Label="endpoints", Tag=3, Type=typing.List[uint]), ]) - privilege: 'AccessControl.Enums.AccessControlEntryPrivilegeEnum' = 0 - authMode: 'AccessControl.Enums.AccessControlEntryAuthModeEnum' = 0 - subjects: 'typing.Union[Nullable, typing.List[uint]]' = NullValue - targets: 'typing.Union[Nullable, typing.List[AccessControl.Structs.AccessControlTargetStruct]]' = NullValue - fabricIndex: 'uint' = 0 + endpointListID: 'uint' = 0 + name: 'str' = "" + type: 'Actions.Enums.EndpointListTypeEnum' = 0 + endpoints: 'typing.List[uint]' = field(default_factory=lambda: []) + class Commands: @dataclass - class AccessControlExtensionStruct(ClusterObject): + class InstantAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=bytes), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - data: 'bytes' = b"" - fabricIndex: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None - class Attributes: @dataclass - class Acl(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + class InstantActionWithTransition(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ]) - value: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = field(default_factory=lambda: []) + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + transitionTime: 'uint' = 0 @dataclass - class Extension(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 + class StartAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) - value: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None @dataclass - class SubjectsPerAccessControlEntry(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 + class StartActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ]) - value: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + duration: 'uint' = 0 @dataclass - class TargetsPerAccessControlEntry(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 + class StopAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) - value: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None @dataclass - class AccessControlEntriesPerFabric(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 + class PauseAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) - value: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 + class PauseActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + duration: 'uint' = 0 @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F + class ResumeAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) + + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + + @dataclass + class EnableAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) + + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + + @dataclass + class EnableActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ]) + + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + duration: 'uint' = 0 + + @dataclass + class DisableAction(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ]) + + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + + @dataclass + class DisableActionWithDuration(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000025 + command_id: typing.ClassVar[int] = 0x0000000B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), + ]) + + actionID: 'uint' = 0 + invokeID: 'typing.Optional[uint]' = None + duration: 'uint' = 0 + + class Attributes: + @dataclass + class ActionList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.ActionStruct]) + + value: 'typing.List[Actions.Structs.ActionStruct]' = field(default_factory=lambda: []) + + @dataclass + class EndpointLists(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.EndpointListStruct]) + + value: 'typing.List[Actions.Structs.EndpointListStruct]' = field(default_factory=lambda: []) + + @dataclass + class SetupURL(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + + value: 'typing.Optional[str]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3434,7 +3275,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3450,7 +3291,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3466,7 +3307,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3482,7 +3323,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -3496,10 +3337,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Events: @dataclass - class AccessControlEntryChanged(ClusterEvent): + class StateChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def event_id(cls) -> int: @@ -3509,24 +3350,20 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=Actions.Enums.ActionStateEnum), ]) - adminNodeID: 'typing.Union[Nullable, uint]' = NullValue - adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue - changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]' = NullValue - fabricIndex: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'uint' = 0 + newState: 'Actions.Enums.ActionStateEnum' = 0 @dataclass - class AccessControlExtensionChanged(ClusterEvent): + class ActionFailed(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000001F + return 0x00000025 @ChipUtility.classproperty def event_id(cls) -> int: @@ -3536,31 +3373,49 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="adminNodeID", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="adminPasscodeID", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="changeType", Tag=3, Type=AccessControl.Enums.ChangeTypeEnum), - ClusterObjectFieldDescriptor(Label="latestValue", Tag=4, Type=typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=Actions.Enums.ActionStateEnum), + ClusterObjectFieldDescriptor(Label="error", Tag=3, Type=Actions.Enums.ActionErrorEnum), ]) - adminNodeID: 'typing.Union[Nullable, uint]' = NullValue - adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue - changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]' = NullValue - fabricIndex: 'uint' = 0 + actionID: 'uint' = 0 + invokeID: 'uint' = 0 + newState: 'Actions.Enums.ActionStateEnum' = 0 + error: 'Actions.Enums.ActionErrorEnum' = 0 @dataclass -class Actions(Cluster): - id: typing.ClassVar[int] = 0x00000025 +class BasicInformation(Cluster): + id: typing.ClassVar[int] = 0x00000028 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="actionList", Tag=0x00000000, Type=typing.List[Actions.Structs.ActionStruct]), - ClusterObjectFieldDescriptor(Label="endpointLists", Tag=0x00000001, Type=typing.List[Actions.Structs.EndpointListStruct]), - ClusterObjectFieldDescriptor(Label="setupURL", Tag=0x00000002, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="dataModelRevision", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000001, Type=str), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="productName", Tag=0x00000003, Type=str), + ClusterObjectFieldDescriptor(Label="productID", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="nodeLabel", Tag=0x00000005, Type=str), + ClusterObjectFieldDescriptor(Label="location", Tag=0x00000006, Type=str), + ClusterObjectFieldDescriptor(Label="hardwareVersion", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="hardwareVersionString", Tag=0x00000008, Type=str), + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0x00000009, Type=uint), + ClusterObjectFieldDescriptor(Label="softwareVersionString", Tag=0x0000000A, Type=str), + ClusterObjectFieldDescriptor(Label="manufacturingDate", Tag=0x0000000B, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="partNumber", Tag=0x0000000C, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="productURL", Tag=0x0000000D, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="productLabel", Tag=0x0000000E, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="serialNumber", Tag=0x0000000F, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="localConfigDisabled", Tag=0x00000010, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="reachable", Tag=0x00000011, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="capabilityMinima", Tag=0x00000013, Type=BasicInformation.Structs.CapabilityMinimaStruct), + ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]), + ClusterObjectFieldDescriptor(Label="specificationVersion", Tag=0x00000015, Type=uint), + ClusterObjectFieldDescriptor(Label="maxPathsPerInvoke", Tag=0x00000016, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -3569,120 +3424,110 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - actionList: 'typing.List[Actions.Structs.ActionStruct]' = None - endpointLists: 'typing.List[Actions.Structs.EndpointListStruct]' = None - setupURL: 'typing.Optional[str]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class ActionErrorEnum(MatterIntEnum): - kUnknown = 0x00 - kInterrupted = 0x01 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class ActionStateEnum(MatterIntEnum): - kInactive = 0x00 - kActive = 0x01 - kPaused = 0x02 - kDisabled = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, + dataModelRevision: 'uint' = None + vendorName: 'str' = None + vendorID: 'uint' = None + productName: 'str' = None + productID: 'uint' = None + nodeLabel: 'str' = None + location: 'str' = None + hardwareVersion: 'uint' = None + hardwareVersionString: 'str' = None + softwareVersion: 'uint' = None + softwareVersionString: 'str' = None + manufacturingDate: 'typing.Optional[str]' = None + partNumber: 'typing.Optional[str]' = None + productURL: 'typing.Optional[str]' = None + productLabel: 'typing.Optional[str]' = None + serialNumber: 'typing.Optional[str]' = None + localConfigDisabled: 'typing.Optional[bool]' = None + reachable: 'typing.Optional[bool]' = None + uniqueID: 'typing.Optional[str]' = None + capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None + productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + specificationVersion: 'uint' = None + maxPathsPerInvoke: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None - class ActionTypeEnum(MatterIntEnum): - kOther = 0x00 - kScene = 0x01 - kSequence = 0x02 - kAutomation = 0x03 - kException = 0x04 - kNotification = 0x05 - kAlarm = 0x06 + class Enums: + class ColorEnum(MatterIntEnum): + kBlack = 0x00 + kNavy = 0x01 + kGreen = 0x02 + kTeal = 0x03 + kMaroon = 0x04 + kPurple = 0x05 + kOlive = 0x06 + kGray = 0x07 + kBlue = 0x08 + kLime = 0x09 + kAqua = 0x0A + kRed = 0x0B + kFuchsia = 0x0C + kYellow = 0x0D + kWhite = 0x0E + kNickel = 0x0F + kChrome = 0x10 + kBrass = 0x11 + kCopper = 0x12 + kSilver = 0x13 + kGold = 0x14 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 21, - class EndpointListTypeEnum(MatterIntEnum): + class ProductFinishEnum(MatterIntEnum): kOther = 0x00 - kRoom = 0x01 - kZone = 0x02 + kMatte = 0x01 + kSatin = 0x02 + kPolished = 0x03 + kRugged = 0x04 + kFabric = 0x05 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class Bitmaps: - class CommandBits(IntFlag): - kInstantAction = 0x1 - kInstantActionWithTransition = 0x2 - kStartAction = 0x4 - kStartActionWithDuration = 0x8 - kStopAction = 0x10 - kPauseAction = 0x20 - kPauseActionWithDuration = 0x40 - kResumeAction = 0x80 - kEnableAction = 0x100 - kEnableActionWithDuration = 0x200 - kDisableAction = 0x400 - kDisableActionWithDuration = 0x800 + kUnknownEnumValue = 6, class Structs: @dataclass - class ActionStruct(ClusterObject): + class CapabilityMinimaStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=Actions.Enums.ActionTypeEnum), - ClusterObjectFieldDescriptor(Label="endpointListID", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="supportedCommands", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="state", Tag=5, Type=Actions.Enums.ActionStateEnum), + ClusterObjectFieldDescriptor(Label="caseSessionsPerFabric", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="subscriptionsPerFabric", Tag=1, Type=uint), ]) - actionID: 'uint' = 0 - name: 'str' = "" - type: 'Actions.Enums.ActionTypeEnum' = 0 - endpointListID: 'uint' = 0 - supportedCommands: 'uint' = 0 - state: 'Actions.Enums.ActionStateEnum' = 0 + caseSessionsPerFabric: 'uint' = 0 + subscriptionsPerFabric: 'uint' = 0 @dataclass - class EndpointListStruct(ClusterObject): + class ProductAppearanceStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="endpointListID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="type", Tag=2, Type=Actions.Enums.EndpointListTypeEnum), - ClusterObjectFieldDescriptor(Label="endpoints", Tag=3, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="finish", Tag=0, Type=BasicInformation.Enums.ProductFinishEnum), + ClusterObjectFieldDescriptor(Label="primaryColor", Tag=1, Type=typing.Union[Nullable, BasicInformation.Enums.ColorEnum]), ]) - endpointListID: 'uint' = 0 - name: 'str' = "" - type: 'Actions.Enums.EndpointListTypeEnum' = 0 - endpoints: 'typing.List[uint]' = field(default_factory=lambda: []) + finish: 'BasicInformation.Enums.ProductFinishEnum' = 0 + primaryColor: 'typing.Union[Nullable, BasicInformation.Enums.ColorEnum]' = NullValue class Commands: @dataclass - class InstantAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000000 + class MfgSpecificPing(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000028 + command_id: typing.ClassVar[int] = 0x10020000 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -3690,263 +3535,194 @@ class InstantAction(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - + class Attributes: @dataclass - class InstantActionWithTransition(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class DataModelRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - transitionTime: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class StartAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class VendorName(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) + def attribute_id(cls) -> int: + return 0x00000001 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" @dataclass - class StartActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class VendorID(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000002 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class StopAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ProductName(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) + def attribute_id(cls) -> int: + return 0x00000003 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" @dataclass - class PauseAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000005 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class ProductID(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) - - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - - @dataclass - class PauseActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000006 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def attribute_id(cls) -> int: + return 0x00000004 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + value: 'uint' = 0 @dataclass - class ResumeAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000007 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - + class NodeLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) - - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + def cluster_id(cls) -> int: + return 0x00000028 - @dataclass - class EnableAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000008 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + value: 'str' = "" @dataclass - class EnableActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x00000009 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class Location(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000006 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" @dataclass - class DisableAction(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x0000000A - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class HardwareVersion(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ]) + def attribute_id(cls) -> int: + return 0x00000007 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 @dataclass - class DisableActionWithDuration(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000025 - command_id: typing.ClassVar[int] = 0x0000000B - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + class HardwareVersionString(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), - ]) + def attribute_id(cls) -> int: + return 0x00000008 - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" - class Attributes: @dataclass - class ActionList(ClusterAttributeDescriptor): + class SoftwareVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.ActionStruct]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.List[Actions.Structs.ActionStruct]' = field(default_factory=lambda: []) + value: 'uint' = 0 @dataclass - class EndpointLists(ClusterAttributeDescriptor): + class SoftwareVersionString(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000000A @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.EndpointListStruct]) + return ClusterObjectFieldDescriptor(Type=str) - value: 'typing.List[Actions.Structs.EndpointListStruct]' = field(default_factory=lambda: []) + value: 'str' = "" @dataclass - class SetupURL(ClusterAttributeDescriptor): + class ManufacturingDate(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x0000000B @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -3955,345 +3731,174 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[str]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class PartNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x0000000C @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[str]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class ProductURL(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x0000000D @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[str]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class ProductLabel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x0000000E @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[str]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class SerialNumber(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x0000000F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[str]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class LocalConfigDisabled(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'uint' = 0 + value: 'typing.Optional[bool]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class Reachable(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'uint' = 0 + value: 'typing.Optional[bool]' = None - class Events: @dataclass - class StateChanged(ClusterEvent): + class UniqueID(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000000 + def attribute_id(cls) -> int: + return 0x00000012 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=Actions.Enums.ActionStateEnum), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - actionID: 'uint' = 0 - invokeID: 'uint' = 0 - newState: 'Actions.Enums.ActionStateEnum' = 0 + value: 'typing.Optional[str]' = None @dataclass - class ActionFailed(ClusterEvent): + class CapabilityMinima(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000025 + return 0x00000028 @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="actionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=Actions.Enums.ActionStateEnum), - ClusterObjectFieldDescriptor(Label="error", Tag=3, Type=Actions.Enums.ActionErrorEnum), - ]) - - actionID: 'uint' = 0 - invokeID: 'uint' = 0 - newState: 'Actions.Enums.ActionStateEnum' = 0 - error: 'Actions.Enums.ActionErrorEnum' = 0 - - -@dataclass -class BasicInformation(Cluster): - id: typing.ClassVar[int] = 0x00000028 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="dataModelRevision", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="vendorName", Tag=0x00000001, Type=str), - ClusterObjectFieldDescriptor(Label="vendorID", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="productName", Tag=0x00000003, Type=str), - ClusterObjectFieldDescriptor(Label="productID", Tag=0x00000004, Type=uint), - ClusterObjectFieldDescriptor(Label="nodeLabel", Tag=0x00000005, Type=str), - ClusterObjectFieldDescriptor(Label="location", Tag=0x00000006, Type=str), - ClusterObjectFieldDescriptor(Label="hardwareVersion", Tag=0x00000007, Type=uint), - ClusterObjectFieldDescriptor(Label="hardwareVersionString", Tag=0x00000008, Type=str), - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0x00000009, Type=uint), - ClusterObjectFieldDescriptor(Label="softwareVersionString", Tag=0x0000000A, Type=str), - ClusterObjectFieldDescriptor(Label="manufacturingDate", Tag=0x0000000B, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="partNumber", Tag=0x0000000C, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="productURL", Tag=0x0000000D, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="productLabel", Tag=0x0000000E, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="serialNumber", Tag=0x0000000F, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="localConfigDisabled", Tag=0x00000010, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="reachable", Tag=0x00000011, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="capabilityMinima", Tag=0x00000013, Type=BasicInformation.Structs.CapabilityMinimaStruct), - ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]), - ClusterObjectFieldDescriptor(Label="specificationVersion", Tag=0x00000015, Type=uint), - ClusterObjectFieldDescriptor(Label="maxPathsPerInvoke", Tag=0x00000016, Type=uint), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) - - dataModelRevision: 'uint' = None - vendorName: 'str' = None - vendorID: 'uint' = None - productName: 'str' = None - productID: 'uint' = None - nodeLabel: 'str' = None - location: 'str' = None - hardwareVersion: 'uint' = None - hardwareVersionString: 'str' = None - softwareVersion: 'uint' = None - softwareVersionString: 'str' = None - manufacturingDate: 'typing.Optional[str]' = None - partNumber: 'typing.Optional[str]' = None - productURL: 'typing.Optional[str]' = None - productLabel: 'typing.Optional[str]' = None - serialNumber: 'typing.Optional[str]' = None - localConfigDisabled: 'typing.Optional[bool]' = None - reachable: 'typing.Optional[bool]' = None - uniqueID: 'typing.Optional[str]' = None - capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None - productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None - specificationVersion: 'uint' = None - maxPathsPerInvoke: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Enums: - class ColorEnum(MatterIntEnum): - kBlack = 0x00 - kNavy = 0x01 - kGreen = 0x02 - kTeal = 0x03 - kMaroon = 0x04 - kPurple = 0x05 - kOlive = 0x06 - kGray = 0x07 - kBlue = 0x08 - kLime = 0x09 - kAqua = 0x0A - kRed = 0x0B - kFuchsia = 0x0C - kYellow = 0x0D - kWhite = 0x0E - kNickel = 0x0F - kChrome = 0x10 - kBrass = 0x11 - kCopper = 0x12 - kSilver = 0x13 - kGold = 0x14 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 21, - - class ProductFinishEnum(MatterIntEnum): - kOther = 0x00 - kMatte = 0x01 - kSatin = 0x02 - kPolished = 0x03 - kRugged = 0x04 - kFabric = 0x05 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 6, - - class Structs: - @dataclass - class CapabilityMinimaStruct(ClusterObject): - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="caseSessionsPerFabric", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="subscriptionsPerFabric", Tag=1, Type=uint), - ]) - - caseSessionsPerFabric: 'uint' = 0 - subscriptionsPerFabric: 'uint' = 0 + def attribute_id(cls) -> int: + return 0x00000013 - @dataclass - class ProductAppearanceStruct(ClusterObject): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="finish", Tag=0, Type=BasicInformation.Enums.ProductFinishEnum), - ClusterObjectFieldDescriptor(Label="primaryColor", Tag=1, Type=typing.Union[Nullable, BasicInformation.Enums.ColorEnum]), - ]) - - finish: 'BasicInformation.Enums.ProductFinishEnum' = 0 - primaryColor: 'typing.Union[Nullable, BasicInformation.Enums.ColorEnum]' = NullValue - - class Commands: - @dataclass - class MfgSpecificPing(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000028 - command_id: typing.ClassVar[int] = 0x10020000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=BasicInformation.Structs.CapabilityMinimaStruct) - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) + value: 'BasicInformation.Structs.CapabilityMinimaStruct' = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) - class Attributes: @dataclass - class DataModelRevision(ClusterAttributeDescriptor): + class ProductAppearance(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]) - value: 'uint' = 0 + value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None @dataclass - class VendorName(ClusterAttributeDescriptor): + class SpecificationVersion(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000015 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'str' = "" + value: 'uint' = 0 @dataclass - class VendorID(ClusterAttributeDescriptor): + class MaxPathsPerInvoke(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000016 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -4302,78 +3907,78 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class ProductName(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'str' = "" + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class ProductID(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'uint' = 0 + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class NodeLabel(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'str' = "" + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Location(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'str' = "" + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class HardwareVersion(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -4382,250 +3987,546 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class HardwareVersionString(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'str' = "" + value: 'uint' = 0 + class Events: @dataclass - class SoftwareVersion(ClusterAttributeDescriptor): + class StartUp(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 + def event_id(cls) -> int: + return 0x00000000 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), + ]) - value: 'uint' = 0 + softwareVersion: 'uint' = 0 @dataclass - class SoftwareVersionString(ClusterAttributeDescriptor): + class ShutDown(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000A + def event_id(cls) -> int: + return 0x00000001 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) - - value: 'str' = "" + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) @dataclass - class ManufacturingDate(ClusterAttributeDescriptor): + class Leave(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000B + def event_id(cls) -> int: + return 0x00000002 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), + ]) - value: 'typing.Optional[str]' = None + fabricIndex: 'uint' = 0 @dataclass - class PartNumber(ClusterAttributeDescriptor): + class ReachableChanged(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000028 @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000C + def event_id(cls) -> int: + return 0x00000003 @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="reachableNewValue", Tag=0, Type=bool), + ]) - value: 'typing.Optional[str]' = None + reachableNewValue: 'bool' = False + + +@dataclass +class OtaSoftwareUpdateProvider(Cluster): + id: typing.ClassVar[int] = 0x00000029 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + class Enums: + class ApplyUpdateActionEnum(MatterIntEnum): + kProceed = 0x00 + kAwaitNextAction = 0x01 + kDiscontinue = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class DownloadProtocolEnum(MatterIntEnum): + kBDXSynchronous = 0x00 + kBDXAsynchronous = 0x01 + kHttps = 0x02 + kVendorSpecific = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class StatusEnum(MatterIntEnum): + kUpdateAvailable = 0x00 + kBusy = 0x01 + kNotAvailable = 0x02 + kDownloadProtocolNotSupported = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class Commands: @dataclass - class ProductURL(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000028 + class QueryImage(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000029 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'QueryImageResponse' @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000D + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="vendorID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="protocolsSupported", Tag=3, Type=typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum]), + ClusterObjectFieldDescriptor(Label="hardwareVersion", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="location", Tag=5, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="requestorCanConsent", Tag=6, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="metadataForProvider", Tag=7, Type=typing.Optional[bytes]), + ]) + + vendorID: 'uint' = 0 + productID: 'uint' = 0 + softwareVersion: 'uint' = 0 + protocolsSupported: 'typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum]' = field(default_factory=lambda: []) + hardwareVersion: 'typing.Optional[uint]' = None + location: 'typing.Optional[str]' = None + requestorCanConsent: 'typing.Optional[bool]' = None + metadataForProvider: 'typing.Optional[bytes]' = None + + @dataclass + class QueryImageResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000029 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=OtaSoftwareUpdateProvider.Enums.StatusEnum), + ClusterObjectFieldDescriptor(Label="delayedActionTime", Tag=1, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="imageURI", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="softwareVersionString", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="updateToken", Tag=5, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="userConsentNeeded", Tag=6, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="metadataForRequestor", Tag=7, Type=typing.Optional[bytes]), + ]) - value: 'typing.Optional[str]' = None + status: 'OtaSoftwareUpdateProvider.Enums.StatusEnum' = 0 + delayedActionTime: 'typing.Optional[uint]' = None + imageURI: 'typing.Optional[str]' = None + softwareVersion: 'typing.Optional[uint]' = None + softwareVersionString: 'typing.Optional[str]' = None + updateToken: 'typing.Optional[bytes]' = None + userConsentNeeded: 'typing.Optional[bool]' = None + metadataForRequestor: 'typing.Optional[bytes]' = None @dataclass - class ProductLabel(ClusterAttributeDescriptor): + class ApplyUpdateRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000029 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ApplyUpdateResponse' + @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000028 + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="updateToken", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="newVersion", Tag=1, Type=uint), + ]) + + updateToken: 'bytes' = b"" + newVersion: 'uint' = 0 + + @dataclass + class ApplyUpdateResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000029 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000E + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="action", Tag=0, Type=OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum), + ClusterObjectFieldDescriptor(Label="delayedActionTime", Tag=1, Type=uint), + ]) + + action: 'OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum' = 0 + delayedActionTime: 'uint' = 0 + + @dataclass + class NotifyUpdateApplied(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000029 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="updateToken", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=1, Type=uint), + ]) - value: 'typing.Optional[str]' = None + updateToken: 'bytes' = b"" + softwareVersion: 'uint' = 0 + class Attributes: @dataclass - class SerialNumber(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000F + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[str]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class LocalConfigDisabled(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000010 + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class Reachable(ClusterAttributeDescriptor): + class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000011 + return 0x0000FFFA @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[bool]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class UniqueID(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000012 + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[str]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class CapabilityMinima(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000013 + return 0x0000FFFC @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=BasicInformation.Structs.CapabilityMinimaStruct) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'BasicInformation.Structs.CapabilityMinimaStruct' = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) + value: 'uint' = 0 @dataclass - class ProductAppearance(ClusterAttributeDescriptor): + class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x00000029 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000014 + return 0x0000FFFD @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]) + return ClusterObjectFieldDescriptor(Type=uint) - value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + value: 'uint' = 0 + + +@dataclass +class OtaSoftwareUpdateRequestor(Cluster): + id: typing.ClassVar[int] = 0x0000002A + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="defaultOTAProviders", Tag=0x00000000, Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]), + ClusterObjectFieldDescriptor(Label="updatePossible", Tag=0x00000001, Type=bool), + ClusterObjectFieldDescriptor(Label="updateState", Tag=0x00000002, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), + ClusterObjectFieldDescriptor(Label="updateStateProgress", Tag=0x00000003, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + defaultOTAProviders: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = None + updatePossible: 'bool' = None + updateState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = None + updateStateProgress: 'typing.Union[Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class AnnouncementReasonEnum(MatterIntEnum): + kSimpleAnnouncement = 0x00 + kUpdateAvailable = 0x01 + kUrgentUpdateAvailable = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class ChangeReasonEnum(MatterIntEnum): + kUnknown = 0x00 + kSuccess = 0x01 + kFailure = 0x02 + kTimeOut = 0x03 + kDelayByProvider = 0x04 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, + + class UpdateStateEnum(MatterIntEnum): + kUnknown = 0x00 + kIdle = 0x01 + kQuerying = 0x02 + kDelayedOnQuery = 0x03 + kDownloading = 0x04 + kApplying = 0x05 + kDelayedOnApply = 0x06 + kRollingBack = 0x07 + kDelayedOnUserConsent = 0x08 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 9, + class Structs: @dataclass - class SpecificationVersion(ClusterAttributeDescriptor): + class ProviderLocation(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="providerNodeID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + providerNodeID: 'uint' = 0 + endpoint: 'uint' = 0 + fabricIndex: 'uint' = 0 + + class Commands: + @dataclass + class AnnounceOTAProvider(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x0000002A + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="providerNodeID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="announcementReason", Tag=2, Type=OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum), + ClusterObjectFieldDescriptor(Label="metadataForNode", Tag=3, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="endpoint", Tag=4, Type=uint), + ]) + + providerNodeID: 'uint' = 0 + vendorID: 'uint' = 0 + announcementReason: 'OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum' = 0 + metadataForNode: 'typing.Optional[bytes]' = None + endpoint: 'uint' = 0 + + class Attributes: + @dataclass + class DefaultOTAProviders(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000015 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]) - value: 'uint' = 0 + value: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = field(default_factory=lambda: []) @dataclass - class MaxPathsPerInvoke(ClusterAttributeDescriptor): + class UpdatePossible(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000016 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=bool) - value: 'uint' = 0 + value: 'bool' = False + + @dataclass + class UpdateState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000002A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum) + + value: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 + + @dataclass + class UpdateStateProgress(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000002A + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4641,7 +4542,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4657,7 +4558,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4673,7 +4574,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4689,7 +4590,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4705,7 +4606,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4719,10 +4620,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class Events: @dataclass - class StartUp(ClusterEvent): + class StateTransition(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: @@ -4732,16 +4633,22 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="previousState", Tag=0, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), + ClusterObjectFieldDescriptor(Label="newState", Tag=1, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), + ClusterObjectFieldDescriptor(Label="reason", Tag=2, Type=OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum), + ClusterObjectFieldDescriptor(Label="targetSoftwareVersion", Tag=3, Type=typing.Union[Nullable, uint]), ]) - softwareVersion: 'uint' = 0 + previousState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 + newState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 + reason: 'OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum' = 0 + targetSoftwareVersion: 'typing.Union[Nullable, uint]' = NullValue @dataclass - class ShutDown(ClusterEvent): + class VersionApplied(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: @@ -4751,55 +4658,49 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), ]) - @dataclass - class Leave(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000028 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), - ]) - - fabricIndex: 'uint' = 0 + softwareVersion: 'uint' = 0 + productID: 'uint' = 0 @dataclass - class ReachableChanged(ClusterEvent): + class DownloadError(ClusterEvent): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000028 + return 0x0000002A @ChipUtility.classproperty def event_id(cls) -> int: - return 0x00000003 + return 0x00000002 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="reachableNewValue", Tag=0, Type=bool), + ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="bytesDownloaded", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="platformCode", Tag=3, Type=typing.Union[Nullable, int]), ]) - reachableNewValue: 'bool' = False + softwareVersion: 'uint' = 0 + bytesDownloaded: 'uint' = 0 + progressPercent: 'typing.Union[Nullable, uint]' = NullValue + platformCode: 'typing.Union[Nullable, int]' = NullValue @dataclass -class OtaSoftwareUpdateProvider(Cluster): - id: typing.ClassVar[int] = 0x00000029 +class LocalizationConfiguration(Cluster): + id: typing.ClassVar[int] = 0x0000002B @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="activeLocale", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="supportedLocales", Tag=0x00000001, Type=typing.List[str]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -4808,6 +4709,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) + activeLocale: 'str' = None + supportedLocales: 'typing.List[str]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -4815,160 +4718,44 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class ApplyUpdateActionEnum(MatterIntEnum): - kProceed = 0x00 - kAwaitNextAction = 0x01 - kDiscontinue = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class DownloadProtocolEnum(MatterIntEnum): - kBDXSynchronous = 0x00 - kBDXAsynchronous = 0x01 - kHttps = 0x02 - kVendorSpecific = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, - - class StatusEnum(MatterIntEnum): - kUpdateAvailable = 0x00 - kBusy = 0x01 - kNotAvailable = 0x02 - kDownloadProtocolNotSupported = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, - - class Commands: + class Attributes: @dataclass - class QueryImage(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000029 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'QueryImageResponse' - + class ActiveLocale(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="vendorID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="protocolsSupported", Tag=3, Type=typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum]), - ClusterObjectFieldDescriptor(Label="hardwareVersion", Tag=4, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="location", Tag=5, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="requestorCanConsent", Tag=6, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="metadataForProvider", Tag=7, Type=typing.Optional[bytes]), - ]) - - vendorID: 'uint' = 0 - productID: 'uint' = 0 - softwareVersion: 'uint' = 0 - protocolsSupported: 'typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum]' = field(default_factory=lambda: []) - hardwareVersion: 'typing.Optional[uint]' = None - location: 'typing.Optional[str]' = None - requestorCanConsent: 'typing.Optional[bool]' = None - metadataForProvider: 'typing.Optional[bytes]' = None - - @dataclass - class QueryImageResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000029 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + def cluster_id(cls) -> int: + return 0x0000002B @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=OtaSoftwareUpdateProvider.Enums.StatusEnum), - ClusterObjectFieldDescriptor(Label="delayedActionTime", Tag=1, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="imageURI", Tag=2, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=3, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="softwareVersionString", Tag=4, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="updateToken", Tag=5, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="userConsentNeeded", Tag=6, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="metadataForRequestor", Tag=7, Type=typing.Optional[bytes]), - ]) - - status: 'OtaSoftwareUpdateProvider.Enums.StatusEnum' = 0 - delayedActionTime: 'typing.Optional[uint]' = None - imageURI: 'typing.Optional[str]' = None - softwareVersion: 'typing.Optional[uint]' = None - softwareVersionString: 'typing.Optional[str]' = None - updateToken: 'typing.Optional[bytes]' = None - userConsentNeeded: 'typing.Optional[bool]' = None - metadataForRequestor: 'typing.Optional[bytes]' = None - - @dataclass - class ApplyUpdateRequest(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000029 - command_id: typing.ClassVar[int] = 0x00000002 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ApplyUpdateResponse' + def attribute_id(cls) -> int: + return 0x00000000 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="updateToken", Tag=0, Type=bytes), - ClusterObjectFieldDescriptor(Label="newVersion", Tag=1, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) - updateToken: 'bytes' = b"" - newVersion: 'uint' = 0 + value: 'str' = "" @dataclass - class ApplyUpdateResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000029 - command_id: typing.ClassVar[int] = 0x00000003 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - + class SupportedLocales(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="action", Tag=0, Type=OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum), - ClusterObjectFieldDescriptor(Label="delayedActionTime", Tag=1, Type=uint), - ]) - - action: 'OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum' = 0 - delayedActionTime: 'uint' = 0 + def cluster_id(cls) -> int: + return 0x0000002B - @dataclass - class NotifyUpdateApplied(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000029 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="updateToken", Tag=0, Type=bytes), - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=1, Type=uint), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[str]) - updateToken: 'bytes' = b"" - softwareVersion: 'uint' = 0 + value: 'typing.List[str]' = field(default_factory=lambda: []) - class Attributes: @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -4984,7 +4771,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5000,7 +4787,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5016,7 +4803,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5032,7 +4819,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5048,7 +4835,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000029 + return 0x0000002B @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5062,17 +4849,16 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class OtaSoftwareUpdateRequestor(Cluster): - id: typing.ClassVar[int] = 0x0000002A +class TimeFormatLocalization(Cluster): + id: typing.ClassVar[int] = 0x0000002C @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="defaultOTAProviders", Tag=0x00000000, Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]), - ClusterObjectFieldDescriptor(Label="updatePossible", Tag=0x00000001, Type=bool), - ClusterObjectFieldDescriptor(Label="updateState", Tag=0x00000002, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), - ClusterObjectFieldDescriptor(Label="updateStateProgress", Tag=0x00000003, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="hourFormat", Tag=0x00000000, Type=TimeFormatLocalization.Enums.HourFormatEnum), + ClusterObjectFieldDescriptor(Label="activeCalendarType", Tag=0x00000001, Type=typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]), + ClusterObjectFieldDescriptor(Label="supportedCalendarTypes", Tag=0x00000002, Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -5081,10 +4867,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - defaultOTAProviders: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = None - updatePossible: 'bool' = None - updateState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = None - updateStateProgress: 'typing.Union[Nullable, uint]' = None + hourFormat: 'TimeFormatLocalization.Enums.HourFormatEnum' = None + activeCalendarType: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None + supportedCalendarTypes: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -5093,107 +4878,62 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class AnnouncementReasonEnum(MatterIntEnum): - kSimpleAnnouncement = 0x00 - kUpdateAvailable = 0x01 - kUrgentUpdateAvailable = 0x02 + class CalendarTypeEnum(MatterIntEnum): + kBuddhist = 0x00 + kChinese = 0x01 + kCoptic = 0x02 + kEthiopian = 0x03 + kGregorian = 0x04 + kHebrew = 0x05 + kIndian = 0x06 + kIslamic = 0x07 + kJapanese = 0x08 + kKorean = 0x09 + kPersian = 0x0A + kTaiwanese = 0x0B + kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 12, - class ChangeReasonEnum(MatterIntEnum): - kUnknown = 0x00 - kSuccess = 0x01 - kFailure = 0x02 - kTimeOut = 0x03 - kDelayByProvider = 0x04 + class HourFormatEnum(MatterIntEnum): + k12hr = 0x00 + k24hr = 0x01 + kUseActiveLocale = 0xFF # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 2, - class UpdateStateEnum(MatterIntEnum): - kUnknown = 0x00 - kIdle = 0x01 - kQuerying = 0x02 - kDelayedOnQuery = 0x03 - kDownloading = 0x04 - kApplying = 0x05 - kDelayedOnApply = 0x06 - kRollingBack = 0x07 - kDelayedOnUserConsent = 0x08 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 9, + class Bitmaps: + class Feature(IntFlag): + kCalendarFormat = 0x1 - class Structs: + class Attributes: @dataclass - class ProviderLocation(ClusterObject): + class HourFormat(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="providerNodeID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), - ]) + def cluster_id(cls) -> int: + return 0x0000002C - providerNodeID: 'uint' = 0 - endpoint: 'uint' = 0 - fabricIndex: 'uint' = 0 - - class Commands: - @dataclass - class AnnounceOTAProvider(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x0000002A - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="providerNodeID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="vendorID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="announcementReason", Tag=2, Type=OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum), - ClusterObjectFieldDescriptor(Label="metadataForNode", Tag=3, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="endpoint", Tag=4, Type=uint), - ]) - - providerNodeID: 'uint' = 0 - vendorID: 'uint' = 0 - announcementReason: 'OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum' = 0 - metadataForNode: 'typing.Optional[bytes]' = None - endpoint: 'uint' = 0 - - class Attributes: - @dataclass - class DefaultOTAProviders(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]) + return ClusterObjectFieldDescriptor(Type=TimeFormatLocalization.Enums.HourFormatEnum) - value: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = field(default_factory=lambda: []) + value: 'TimeFormatLocalization.Enums.HourFormatEnum' = 0 @dataclass - class UpdatePossible(ClusterAttributeDescriptor): + class ActiveCalendarType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5201,15 +4941,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]) - value: 'bool' = False + value: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None @dataclass - class UpdateState(ClusterAttributeDescriptor): + class SupportedCalendarTypes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5217,31 +4957,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum) - - value: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 - - @dataclass - class UpdateStateProgress(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5257,7 +4981,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5273,7 +4997,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5289,7 +5013,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5305,7 +5029,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5321,7 +5045,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002A + return 0x0000002C @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5333,89 +5057,16 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - class Events: - @dataclass - class StateTransition(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="previousState", Tag=0, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), - ClusterObjectFieldDescriptor(Label="newState", Tag=1, Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum), - ClusterObjectFieldDescriptor(Label="reason", Tag=2, Type=OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum), - ClusterObjectFieldDescriptor(Label="targetSoftwareVersion", Tag=3, Type=typing.Union[Nullable, uint]), - ]) - - previousState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 - newState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 - reason: 'OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum' = 0 - targetSoftwareVersion: 'typing.Union[Nullable, uint]' = NullValue - - @dataclass - class VersionApplied(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), - ]) - - softwareVersion: 'uint' = 0 - productID: 'uint' = 0 - - @dataclass - class DownloadError(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="bytesDownloaded", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="platformCode", Tag=3, Type=typing.Union[Nullable, int]), - ]) - - softwareVersion: 'uint' = 0 - bytesDownloaded: 'uint' = 0 - progressPercent: 'typing.Union[Nullable, uint]' = NullValue - platformCode: 'typing.Union[Nullable, int]' = NullValue - @dataclass -class LocalizationConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0000002B +class UnitLocalization(Cluster): + id: typing.ClassVar[int] = 0x0000002D @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="activeLocale", Tag=0x00000000, Type=str), - ClusterObjectFieldDescriptor(Label="supportedLocales", Tag=0x00000001, Type=typing.List[str]), + ClusterObjectFieldDescriptor(Label="temperatureUnit", Tag=0x00000000, Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -5424,8 +5075,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - activeLocale: 'str' = None - supportedLocales: 'typing.List[str]' = None + temperatureUnit: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -5433,44 +5083,43 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Attributes: - @dataclass - class ActiveLocale(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + class Enums: + class TempUnitEnum(MatterIntEnum): + kFahrenheit = 0x00 + kCelsius = 0x01 + kKelvin = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, - value: 'str' = "" + class Bitmaps: + class Feature(IntFlag): + kTemperatureUnit = 0x1 + class Attributes: @dataclass - class SupportedLocales(ClusterAttributeDescriptor): + class TemperatureUnit(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[str]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]) - value: 'typing.List[str]' = field(default_factory=lambda: []) + value: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5486,7 +5135,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5502,7 +5151,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5518,7 +5167,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5534,7 +5183,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5550,7 +5199,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002B + return 0x0000002D @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5564,16 +5213,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class TimeFormatLocalization(Cluster): - id: typing.ClassVar[int] = 0x0000002C +class PowerSourceConfiguration(Cluster): + id: typing.ClassVar[int] = 0x0000002E @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="hourFormat", Tag=0x00000000, Type=TimeFormatLocalization.Enums.HourFormatEnum), - ClusterObjectFieldDescriptor(Label="activeCalendarType", Tag=0x00000001, Type=typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]), - ClusterObjectFieldDescriptor(Label="supportedCalendarTypes", Tag=0x00000002, Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]), + ClusterObjectFieldDescriptor(Label="sources", Tag=0x00000000, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -5582,9 +5229,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - hourFormat: 'TimeFormatLocalization.Enums.HourFormatEnum' = None - activeCalendarType: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None - supportedCalendarTypes: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None + sources: 'typing.List[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -5592,47 +5237,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class CalendarTypeEnum(MatterIntEnum): - kBuddhist = 0x00 - kChinese = 0x01 - kCoptic = 0x02 - kEthiopian = 0x03 - kGregorian = 0x04 - kHebrew = 0x05 - kIndian = 0x06 - kIslamic = 0x07 - kJapanese = 0x08 - kKorean = 0x09 - kPersian = 0x0A - kTaiwanese = 0x0B - kUseActiveLocale = 0xFF - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 12, - - class HourFormatEnum(MatterIntEnum): - k12hr = 0x00 - k24hr = 0x01 - kUseActiveLocale = 0xFF - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class Bitmaps: - class Feature(IntFlag): - kCalendarFormat = 0x1 - - class Attributes: - @dataclass - class HourFormat(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002C + class Attributes: + @dataclass + class Sources(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5640,47 +5250,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=TimeFormatLocalization.Enums.HourFormatEnum) - - value: 'TimeFormatLocalization.Enums.HourFormatEnum' = 0 - - @dataclass - class ActiveCalendarType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]) - - value: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None - - @dataclass - class SupportedCalendarTypes(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]) + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None + value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5696,7 +5274,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5712,7 +5290,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5728,7 +5306,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5744,7 +5322,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5760,7 +5338,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002C + return 0x0000002E @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -5774,14 +5352,45 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class UnitLocalization(Cluster): - id: typing.ClassVar[int] = 0x0000002D +class PowerSource(Cluster): + id: typing.ClassVar[int] = 0x0000002F @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="temperatureUnit", Tag=0x00000000, Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]), + ClusterObjectFieldDescriptor(Label="status", Tag=0x00000000, Type=PowerSource.Enums.PowerSourceStatusEnum), + ClusterObjectFieldDescriptor(Label="order", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000002, Type=str), + ClusterObjectFieldDescriptor(Label="wiredAssessedInputVoltage", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="wiredAssessedInputFrequency", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="wiredCurrentType", Tag=0x00000005, Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]), + ClusterObjectFieldDescriptor(Label="wiredAssessedCurrent", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="wiredNominalVoltage", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="wiredMaximumCurrent", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="wiredPresent", Tag=0x00000009, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="activeWiredFaults", Tag=0x0000000A, Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]), + ClusterObjectFieldDescriptor(Label="batVoltage", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="batPercentRemaining", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="batTimeRemaining", Tag=0x0000000D, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="batChargeLevel", Tag=0x0000000E, Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]), + ClusterObjectFieldDescriptor(Label="batReplacementNeeded", Tag=0x0000000F, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="batReplaceability", Tag=0x00000010, Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]), + ClusterObjectFieldDescriptor(Label="batPresent", Tag=0x00000011, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="activeBatFaults", Tag=0x00000012, Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]), + ClusterObjectFieldDescriptor(Label="batReplacementDescription", Tag=0x00000013, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="batCommonDesignation", Tag=0x00000014, Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]), + ClusterObjectFieldDescriptor(Label="batANSIDesignation", Tag=0x00000015, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="batIECDesignation", Tag=0x00000016, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="batApprovedChemistry", Tag=0x00000017, Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]), + ClusterObjectFieldDescriptor(Label="batCapacity", Tag=0x00000018, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="batQuantity", Tag=0x00000019, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="batChargeState", Tag=0x0000001A, Type=typing.Optional[PowerSource.Enums.BatChargeStateEnum]), + ClusterObjectFieldDescriptor(Label="batTimeToFullCharge", Tag=0x0000001B, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="batFunctionalWhileCharging", Tag=0x0000001C, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="batChargingCurrent", Tag=0x0000001D, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="activeBatChargeFaults", Tag=0x0000001E, Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]), + ClusterObjectFieldDescriptor(Label="endpointList", Tag=0x0000001F, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -5790,7 +5399,38 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureUnit: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None + status: 'PowerSource.Enums.PowerSourceStatusEnum' = None + order: 'uint' = None + description: 'str' = None + wiredAssessedInputVoltage: 'typing.Union[None, Nullable, uint]' = None + wiredAssessedInputFrequency: 'typing.Union[None, Nullable, uint]' = None + wiredCurrentType: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None + wiredAssessedCurrent: 'typing.Union[None, Nullable, uint]' = None + wiredNominalVoltage: 'typing.Optional[uint]' = None + wiredMaximumCurrent: 'typing.Optional[uint]' = None + wiredPresent: 'typing.Optional[bool]' = None + activeWiredFaults: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None + batVoltage: 'typing.Union[None, Nullable, uint]' = None + batPercentRemaining: 'typing.Union[None, Nullable, uint]' = None + batTimeRemaining: 'typing.Union[None, Nullable, uint]' = None + batChargeLevel: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None + batReplacementNeeded: 'typing.Optional[bool]' = None + batReplaceability: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None + batPresent: 'typing.Optional[bool]' = None + activeBatFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None + batReplacementDescription: 'typing.Optional[str]' = None + batCommonDesignation: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None + batANSIDesignation: 'typing.Optional[str]' = None + batIECDesignation: 'typing.Optional[str]' = None + batApprovedChemistry: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None + batCapacity: 'typing.Optional[uint]' = None + batQuantity: 'typing.Optional[uint]' = None + batChargeState: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None + batTimeToFullCharge: 'typing.Union[None, Nullable, uint]' = None + batFunctionalWhileCharging: 'typing.Optional[bool]' = None + batChargingCurrent: 'typing.Union[None, Nullable, uint]' = None + activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None + endpointList: 'typing.List[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -5799,110 +5439,297 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class TempUnitEnum(MatterIntEnum): - kFahrenheit = 0x00 - kCelsius = 0x01 - kKelvin = 0x02 + class BatApprovedChemistryEnum(MatterIntEnum): + kUnspecified = 0x00 + kAlkaline = 0x01 + kLithiumCarbonFluoride = 0x02 + kLithiumChromiumOxide = 0x03 + kLithiumCopperOxide = 0x04 + kLithiumIronDisulfide = 0x05 + kLithiumManganeseDioxide = 0x06 + kLithiumThionylChloride = 0x07 + kMagnesium = 0x08 + kMercuryOxide = 0x09 + kNickelOxyhydride = 0x0A + kSilverOxide = 0x0B + kZincAir = 0x0C + kZincCarbon = 0x0D + kZincChloride = 0x0E + kZincManganeseDioxide = 0x0F + kLeadAcid = 0x10 + kLithiumCobaltOxide = 0x11 + kLithiumIon = 0x12 + kLithiumIonPolymer = 0x13 + kLithiumIronPhosphate = 0x14 + kLithiumSulfur = 0x15 + kLithiumTitanate = 0x16 + kNickelCadmium = 0x17 + kNickelHydrogen = 0x18 + kNickelIron = 0x19 + kNickelMetalHydride = 0x1A + kNickelZinc = 0x1B + kSilverZinc = 0x1C + kSodiumIon = 0x1D + kSodiumSulfur = 0x1E + kZincBromide = 0x1F + kZincCerium = 0x20 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class Bitmaps: - class Feature(IntFlag): - kTemperatureUnit = 0x1 - - class Attributes: - @dataclass - class TemperatureUnit(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]) - - value: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF8 + kUnknownEnumValue = 33, - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + class BatChargeFaultEnum(MatterIntEnum): + kUnspecified = 0x00 + kAmbientTooHot = 0x01 + kAmbientTooCold = 0x02 + kBatteryTooHot = 0x03 + kBatteryTooCold = 0x04 + kBatteryAbsent = 0x05 + kBatteryOverVoltage = 0x06 + kBatteryUnderVoltage = 0x07 + kChargerOverVoltage = 0x08 + kChargerUnderVoltage = 0x09 + kSafetyTimeout = 0x0A + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 11, - value: 'typing.List[uint]' = field(default_factory=lambda: []) + class BatChargeLevelEnum(MatterIntEnum): + kOk = 0x00 + kWarning = 0x01 + kCritical = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, - @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002D + class BatChargeStateEnum(MatterIntEnum): + kUnknown = 0x00 + kIsCharging = 0x01 + kIsAtFullCharge = 0x02 + kIsNotCharging = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFF9 + class BatCommonDesignationEnum(MatterIntEnum): + kUnspecified = 0x00 + kAaa = 0x01 + kAa = 0x02 + kC = 0x03 + kD = 0x04 + k4v5 = 0x05 + k6v0 = 0x06 + k9v0 = 0x07 + k12aa = 0x08 + kAaaa = 0x09 + kA = 0x0A + kB = 0x0B + kF = 0x0C + kN = 0x0D + kNo6 = 0x0E + kSubC = 0x0F + kA23 = 0x10 + kA27 = 0x11 + kBa5800 = 0x12 + kDuplex = 0x13 + k4sr44 = 0x14 + k523 = 0x15 + k531 = 0x16 + k15v0 = 0x17 + k22v5 = 0x18 + k30v0 = 0x19 + k45v0 = 0x1A + k67v5 = 0x1B + kJ = 0x1C + kCr123a = 0x1D + kCr2 = 0x1E + k2cr5 = 0x1F + kCrP2 = 0x20 + kCrV3 = 0x21 + kSr41 = 0x22 + kSr43 = 0x23 + kSr44 = 0x24 + kSr45 = 0x25 + kSr48 = 0x26 + kSr54 = 0x27 + kSr55 = 0x28 + kSr57 = 0x29 + kSr58 = 0x2A + kSr59 = 0x2B + kSr60 = 0x2C + kSr63 = 0x2D + kSr64 = 0x2E + kSr65 = 0x2F + kSr66 = 0x30 + kSr67 = 0x31 + kSr68 = 0x32 + kSr69 = 0x33 + kSr516 = 0x34 + kSr731 = 0x35 + kSr712 = 0x36 + kLr932 = 0x37 + kA5 = 0x38 + kA10 = 0x39 + kA13 = 0x3A + kA312 = 0x3B + kA675 = 0x3C + kAc41e = 0x3D + k10180 = 0x3E + k10280 = 0x3F + k10440 = 0x40 + k14250 = 0x41 + k14430 = 0x42 + k14500 = 0x43 + k14650 = 0x44 + k15270 = 0x45 + k16340 = 0x46 + kRcr123a = 0x47 + k17500 = 0x48 + k17670 = 0x49 + k18350 = 0x4A + k18500 = 0x4B + k18650 = 0x4C + k19670 = 0x4D + k25500 = 0x4E + k26650 = 0x4F + k32600 = 0x50 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 81, - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + class BatFaultEnum(MatterIntEnum): + kUnspecified = 0x00 + kOverTemp = 0x01 + kUnderTemp = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, - value: 'typing.List[uint]' = field(default_factory=lambda: []) + class BatReplaceabilityEnum(MatterIntEnum): + kUnspecified = 0x00 + kNotReplaceable = 0x01 + kUserReplaceable = 0x02 + kFactoryReplaceable = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class PowerSourceStatusEnum(MatterIntEnum): + kUnspecified = 0x00 + kActive = 0x01 + kStandby = 0x02 + kUnavailable = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class WiredCurrentTypeEnum(MatterIntEnum): + kAc = 0x00 + kDc = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + + class WiredFaultEnum(MatterIntEnum): + kUnspecified = 0x00 + kOverVoltage = 0x01 + kUnderVoltage = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class Bitmaps: + class Feature(IntFlag): + kWired = 0x1 + kBattery = 0x2 + kRechargeable = 0x4 + kReplaceable = 0x8 + class Structs: @dataclass - class EventList(ClusterAttributeDescriptor): + class BatChargeFaultChangeType(ClusterObject): @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002D + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), + ]) + + current: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + @dataclass + class BatFaultChangeType(ClusterObject): @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFaultEnum]), + ]) + + current: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + @dataclass + class WiredFaultChangeType(ClusterObject): @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), + ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), + ]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + current: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + previous: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + class Attributes: @dataclass - class AttributeList(ClusterAttributeDescriptor): + class Status(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002D + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=PowerSource.Enums.PowerSourceStatusEnum) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'PowerSource.Enums.PowerSourceStatusEnum' = 0 @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class Order(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002D + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -5911,896 +5738,354 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class Description(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002D + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - -@dataclass -class PowerSourceConfiguration(Cluster): - id: typing.ClassVar[int] = 0x0000002E - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="sources", Tag=0x00000000, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + return ClusterObjectFieldDescriptor(Type=str) - sources: 'typing.List[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'str' = "" - class Attributes: @dataclass - class Sources(ClusterAttributeDescriptor): + class WiredAssessedInputVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class WiredAssessedInputFrequency(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class WiredCurrentType(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None @dataclass - class EventList(ClusterAttributeDescriptor): + class WiredAssessedCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class AttributeList(ClusterAttributeDescriptor): + class WiredNominalVoltage(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[uint]' = None @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class WiredMaximumCurrent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFC + return 0x00000008 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass - class ClusterRevision(ClusterAttributeDescriptor): + class WiredPresent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x0000002E + return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFD + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'uint' = 0 + value: 'typing.Optional[bool]' = None + @dataclass + class ActiveWiredFaults(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000002F -@dataclass -class PowerSource(Cluster): - id: typing.ClassVar[int] = 0x0000002F + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000A - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0x00000000, Type=PowerSource.Enums.PowerSourceStatusEnum), - ClusterObjectFieldDescriptor(Label="order", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="description", Tag=0x00000002, Type=str), - ClusterObjectFieldDescriptor(Label="wiredAssessedInputVoltage", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="wiredAssessedInputFrequency", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="wiredCurrentType", Tag=0x00000005, Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]), - ClusterObjectFieldDescriptor(Label="wiredAssessedCurrent", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="wiredNominalVoltage", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="wiredMaximumCurrent", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="wiredPresent", Tag=0x00000009, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="activeWiredFaults", Tag=0x0000000A, Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]), - ClusterObjectFieldDescriptor(Label="batVoltage", Tag=0x0000000B, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="batPercentRemaining", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="batTimeRemaining", Tag=0x0000000D, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="batChargeLevel", Tag=0x0000000E, Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]), - ClusterObjectFieldDescriptor(Label="batReplacementNeeded", Tag=0x0000000F, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="batReplaceability", Tag=0x00000010, Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]), - ClusterObjectFieldDescriptor(Label="batPresent", Tag=0x00000011, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="activeBatFaults", Tag=0x00000012, Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]), - ClusterObjectFieldDescriptor(Label="batReplacementDescription", Tag=0x00000013, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="batCommonDesignation", Tag=0x00000014, Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]), - ClusterObjectFieldDescriptor(Label="batANSIDesignation", Tag=0x00000015, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="batIECDesignation", Tag=0x00000016, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="batApprovedChemistry", Tag=0x00000017, Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]), - ClusterObjectFieldDescriptor(Label="batCapacity", Tag=0x00000018, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="batQuantity", Tag=0x00000019, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="batChargeState", Tag=0x0000001A, Type=typing.Optional[PowerSource.Enums.BatChargeStateEnum]), - ClusterObjectFieldDescriptor(Label="batTimeToFullCharge", Tag=0x0000001B, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="batFunctionalWhileCharging", Tag=0x0000001C, Type=typing.Optional[bool]), - ClusterObjectFieldDescriptor(Label="batChargingCurrent", Tag=0x0000001D, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="activeBatChargeFaults", Tag=0x0000001E, Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]), - ClusterObjectFieldDescriptor(Label="endpointList", Tag=0x0000001F, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), - ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), - ]) + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]) - status: 'PowerSource.Enums.PowerSourceStatusEnum' = None - order: 'uint' = None - description: 'str' = None - wiredAssessedInputVoltage: 'typing.Union[None, Nullable, uint]' = None - wiredAssessedInputFrequency: 'typing.Union[None, Nullable, uint]' = None - wiredCurrentType: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None - wiredAssessedCurrent: 'typing.Union[None, Nullable, uint]' = None - wiredNominalVoltage: 'typing.Optional[uint]' = None - wiredMaximumCurrent: 'typing.Optional[uint]' = None - wiredPresent: 'typing.Optional[bool]' = None - activeWiredFaults: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None - batVoltage: 'typing.Union[None, Nullable, uint]' = None - batPercentRemaining: 'typing.Union[None, Nullable, uint]' = None - batTimeRemaining: 'typing.Union[None, Nullable, uint]' = None - batChargeLevel: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None - batReplacementNeeded: 'typing.Optional[bool]' = None - batReplaceability: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None - batPresent: 'typing.Optional[bool]' = None - activeBatFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None - batReplacementDescription: 'typing.Optional[str]' = None - batCommonDesignation: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None - batANSIDesignation: 'typing.Optional[str]' = None - batIECDesignation: 'typing.Optional[str]' = None - batApprovedChemistry: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None - batCapacity: 'typing.Optional[uint]' = None - batQuantity: 'typing.Optional[uint]' = None - batChargeState: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None - batTimeToFullCharge: 'typing.Union[None, Nullable, uint]' = None - batFunctionalWhileCharging: 'typing.Optional[bool]' = None - batChargingCurrent: 'typing.Union[None, Nullable, uint]' = None - activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None - endpointList: 'typing.List[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + value: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None - class Enums: - class BatApprovedChemistryEnum(MatterIntEnum): - kUnspecified = 0x00 - kAlkaline = 0x01 - kLithiumCarbonFluoride = 0x02 - kLithiumChromiumOxide = 0x03 - kLithiumCopperOxide = 0x04 - kLithiumIronDisulfide = 0x05 - kLithiumManganeseDioxide = 0x06 - kLithiumThionylChloride = 0x07 - kMagnesium = 0x08 - kMercuryOxide = 0x09 - kNickelOxyhydride = 0x0A - kSilverOxide = 0x0B - kZincAir = 0x0C - kZincCarbon = 0x0D - kZincChloride = 0x0E - kZincManganeseDioxide = 0x0F - kLeadAcid = 0x10 - kLithiumCobaltOxide = 0x11 - kLithiumIon = 0x12 - kLithiumIonPolymer = 0x13 - kLithiumIronPhosphate = 0x14 - kLithiumSulfur = 0x15 - kLithiumTitanate = 0x16 - kNickelCadmium = 0x17 - kNickelHydrogen = 0x18 - kNickelIron = 0x19 - kNickelMetalHydride = 0x1A - kNickelZinc = 0x1B - kSilverZinc = 0x1C - kSodiumIon = 0x1D - kSodiumSulfur = 0x1E - kZincBromide = 0x1F - kZincCerium = 0x20 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 33, + @dataclass + class BatVoltage(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000002F - class BatChargeFaultEnum(MatterIntEnum): - kUnspecified = 0x00 - kAmbientTooHot = 0x01 - kAmbientTooCold = 0x02 - kBatteryTooHot = 0x03 - kBatteryTooCold = 0x04 - kBatteryAbsent = 0x05 - kBatteryOverVoltage = 0x06 - kBatteryUnderVoltage = 0x07 - kChargerOverVoltage = 0x08 - kChargerUnderVoltage = 0x09 - kSafetyTimeout = 0x0A - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 11, + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000B - class BatChargeLevelEnum(MatterIntEnum): - kOk = 0x00 - kWarning = 0x01 - kCritical = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - class BatChargeStateEnum(MatterIntEnum): - kUnknown = 0x00 - kIsCharging = 0x01 - kIsAtFullCharge = 0x02 - kIsNotCharging = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, + value: 'typing.Union[None, Nullable, uint]' = None - class BatCommonDesignationEnum(MatterIntEnum): - kUnspecified = 0x00 - kAaa = 0x01 - kAa = 0x02 - kC = 0x03 - kD = 0x04 - k4v5 = 0x05 - k6v0 = 0x06 - k9v0 = 0x07 - k12aa = 0x08 - kAaaa = 0x09 - kA = 0x0A - kB = 0x0B - kF = 0x0C - kN = 0x0D - kNo6 = 0x0E - kSubC = 0x0F - kA23 = 0x10 - kA27 = 0x11 - kBa5800 = 0x12 - kDuplex = 0x13 - k4sr44 = 0x14 - k523 = 0x15 - k531 = 0x16 - k15v0 = 0x17 - k22v5 = 0x18 - k30v0 = 0x19 - k45v0 = 0x1A - k67v5 = 0x1B - kJ = 0x1C - kCr123a = 0x1D - kCr2 = 0x1E - k2cr5 = 0x1F - kCrP2 = 0x20 - kCrV3 = 0x21 - kSr41 = 0x22 - kSr43 = 0x23 - kSr44 = 0x24 - kSr45 = 0x25 - kSr48 = 0x26 - kSr54 = 0x27 - kSr55 = 0x28 - kSr57 = 0x29 - kSr58 = 0x2A - kSr59 = 0x2B - kSr60 = 0x2C - kSr63 = 0x2D - kSr64 = 0x2E - kSr65 = 0x2F - kSr66 = 0x30 - kSr67 = 0x31 - kSr68 = 0x32 - kSr69 = 0x33 - kSr516 = 0x34 - kSr731 = 0x35 - kSr712 = 0x36 - kLr932 = 0x37 - kA5 = 0x38 - kA10 = 0x39 - kA13 = 0x3A - kA312 = 0x3B - kA675 = 0x3C - kAc41e = 0x3D - k10180 = 0x3E - k10280 = 0x3F - k10440 = 0x40 - k14250 = 0x41 - k14430 = 0x42 - k14500 = 0x43 - k14650 = 0x44 - k15270 = 0x45 - k16340 = 0x46 - kRcr123a = 0x47 - k17500 = 0x48 - k17670 = 0x49 - k18350 = 0x4A - k18500 = 0x4B - k18650 = 0x4C - k19670 = 0x4D - k25500 = 0x4E - k26650 = 0x4F - k32600 = 0x50 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 81, - - class BatFaultEnum(MatterIntEnum): - kUnspecified = 0x00 - kOverTemp = 0x01 - kUnderTemp = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class BatReplaceabilityEnum(MatterIntEnum): - kUnspecified = 0x00 - kNotReplaceable = 0x01 - kUserReplaceable = 0x02 - kFactoryReplaceable = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, - - class PowerSourceStatusEnum(MatterIntEnum): - kUnspecified = 0x00 - kActive = 0x01 - kStandby = 0x02 - kUnavailable = 0x03 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 4, - - class WiredCurrentTypeEnum(MatterIntEnum): - kAc = 0x00 - kDc = 0x01 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 2, - - class WiredFaultEnum(MatterIntEnum): - kUnspecified = 0x00 - kOverVoltage = 0x01 - kUnderVoltage = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - - class Bitmaps: - class Feature(IntFlag): - kWired = 0x1 - kBattery = 0x2 - kRechargeable = 0x4 - kReplaceable = 0x8 - - class Structs: @dataclass - class BatChargeFaultChangeType(ClusterObject): + class BatPercentRemaining(ClusterAttributeDescriptor): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), - ]) - - current: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + def cluster_id(cls) -> int: + return 0x0000002F - @dataclass - class BatFaultChangeType(ClusterObject): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.BatFaultEnum]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFaultEnum]), - ]) - - current: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + def attribute_id(cls) -> int: + return 0x0000000C - @dataclass - class WiredFaultChangeType(ClusterObject): @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="current", Tag=0, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), - ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), - ]) + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - current: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None - class Attributes: @dataclass - class Status(ClusterAttributeDescriptor): + class BatTimeRemaining(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x0000000D @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=PowerSource.Enums.PowerSourceStatusEnum) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'PowerSource.Enums.PowerSourceStatusEnum' = 0 + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class Order(ClusterAttributeDescriptor): + class BatChargeLevel(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x0000000E @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]) - value: 'uint' = 0 + value: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None @dataclass - class Description(ClusterAttributeDescriptor): + class BatReplacementNeeded(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x0000000F @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'str' = "" + value: 'typing.Optional[bool]' = None @dataclass - class WiredAssessedInputVoltage(ClusterAttributeDescriptor): + class BatReplaceability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000010 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None @dataclass - class WiredAssessedInputFrequency(ClusterAttributeDescriptor): + class BatPresent(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000011 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[bool]' = None @dataclass - class WiredCurrentType(ClusterAttributeDescriptor): + class ActiveBatFaults(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000012 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]) - value: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None + value: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None @dataclass - class WiredAssessedCurrent(ClusterAttributeDescriptor): + class BatReplacementDescription(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000013 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[str]' = None @dataclass - class WiredNominalVoltage(ClusterAttributeDescriptor): + class BatCommonDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000014 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None @dataclass - class WiredMaximumCurrent(ClusterAttributeDescriptor): + class BatANSIDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000015 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[str]' = None @dataclass - class WiredPresent(ClusterAttributeDescriptor): + class BatIECDesignation(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000009 + return 0x00000016 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[bool]' = None + value: 'typing.Optional[str]' = None @dataclass - class ActiveWiredFaults(ClusterAttributeDescriptor): + class BatApprovedChemistry(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000002F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000000A + return 0x00000017 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]) - - value: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None - - @dataclass - class BatVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000B - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class BatPercentRemaining(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class BatTimeRemaining(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000D - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class BatChargeLevel(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]) - - value: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None - - @dataclass - class BatReplacementNeeded(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - - value: 'typing.Optional[bool]' = None - - @dataclass - class BatReplaceability(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000010 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]) - - value: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None - - @dataclass - class BatPresent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000011 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - - value: 'typing.Optional[bool]' = None - - @dataclass - class ActiveBatFaults(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000012 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]) - - value: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None - - @dataclass - class BatReplacementDescription(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000013 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class BatCommonDesignation(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000014 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]) - - value: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None - - @dataclass - class BatANSIDesignation(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000015 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class BatIECDesignation(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000016 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class BatApprovedChemistry(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000017 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]) value: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None @@ -20603,92 +19888,814 @@ class OperationalStateEnum(MatterIntEnum): # prone, and was removed. See # src/app/common/templates/config-data.yaml. - class Structs: + class Structs: + @dataclass + class ErrorStateStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="errorStateID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="errorStateLabel", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="errorStateDetails", Tag=2, Type=typing.Optional[str]), + ]) + + errorStateID: 'uint' = 0 + errorStateLabel: 'typing.Optional[str]' = None + errorStateDetails: 'typing.Optional[str]' = None + + @dataclass + class OperationalStateStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="operationalStateID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="operationalStateLabel", Tag=1, Type=typing.Optional[str]), + ]) + + operationalStateID: 'uint' = 0 + operationalStateLabel: 'typing.Optional[str]' = None + + class Commands: + @dataclass + class Pause(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Stop(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Start(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class Resume(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class OperationalCommandResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000061 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), + ]) + + commandResponseState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + + class Attributes: + @dataclass + class PhaseList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[str]]) + + value: 'typing.Union[Nullable, typing.List[str]]' = NullValue + + @dataclass + class CurrentPhase(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class CountdownTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OperationalStateList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]) + + value: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + + @dataclass + class OperationalState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class OperationalError(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=RvcOperationalState.Structs.ErrorStateStruct) + + value: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class OperationalError(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), + ]) + + errorState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + + @dataclass + class OperationCompletion(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000061 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="completionErrorCode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="totalOperationalTime", Tag=1, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="pausedTime", Tag=2, Type=typing.Union[None, Nullable, uint]), + ]) + + completionErrorCode: 'uint' = 0 + totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None + pausedTime: 'typing.Union[None, Nullable, uint]' = None + + +@dataclass +class ScenesManagement(Cluster): + id: typing.ClassVar[int] = 0x00000062 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="nameSupport", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="lastConfiguredBy", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sceneTableSize", Tag=0x00000006, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricSceneInfo", Tag=0x00000007, Type=typing.List[ScenesManagement.Structs.SceneInfoStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + sceneCount: 'typing.Optional[uint]' = None + currentScene: 'typing.Optional[uint]' = None + currentGroup: 'typing.Optional[uint]' = None + sceneValid: 'typing.Optional[bool]' = None + nameSupport: 'uint' = None + lastConfiguredBy: 'typing.Union[None, Nullable, uint]' = None + sceneTableSize: 'uint' = None + fabricSceneInfo: 'typing.List[ScenesManagement.Structs.SceneInfoStruct]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class CopyModeBitmap(IntFlag): + kCopyAllScenes = 0x1 + + class Feature(IntFlag): + kSceneNames = 0x1 + kExplicit = 0x2 + kTableSize = 0x4 + kFabricScenes = 0x8 + + class NameSupportBitmap(IntFlag): + kSceneNames = 0x80 + + class Structs: + @dataclass + class AttributeValuePair(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="attributeID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="attributeValue", Tag=1, Type=uint), + ]) + + attributeID: 'uint' = 0 + attributeValue: 'uint' = 0 + + @dataclass + class ExtensionFieldSet(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="clusterID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="attributeValueList", Tag=1, Type=typing.List[ScenesManagement.Structs.AttributeValuePair]), + ]) + + clusterID: 'uint' = 0 + attributeValueList: 'typing.List[ScenesManagement.Structs.AttributeValuePair]' = field(default_factory=lambda: []) + + @dataclass + class SceneInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=3, Type=bool), + ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + sceneCount: 'uint' = 0 + currentScene: 'uint' = 0 + currentGroup: 'uint' = 0 + sceneValid: 'bool' = False + remainingCapacity: 'uint' = 0 + fabricIndex: 'uint' = 0 + + class Commands: + @dataclass + class AddScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'AddSceneResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneName", Tag=3, Type=str), + ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=4, Type=typing.List[ScenesManagement.Structs.ExtensionFieldSet]), + ]) + + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'uint' = 0 + sceneName: 'str' = "" + extensionFieldSets: 'typing.List[ScenesManagement.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) + + @dataclass + class AddSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class ViewScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ViewSceneResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ]) + + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class ViewSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sceneName", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=5, Type=typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'typing.Optional[uint]' = None + sceneName: 'typing.Optional[str]' = None + extensionFieldSets: 'typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]' = None + + @dataclass + class RemoveScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RemoveSceneResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ]) + + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class RemoveSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class RemoveAllScenes(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'RemoveAllScenesResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ]) + + groupID: 'uint' = 0 + + @dataclass + class RemoveAllScenesResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + + @dataclass + class StoreScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'StoreSceneResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ]) + + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class StoreSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + + @dataclass + class RecallScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[None, Nullable, uint]), + ]) + + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'typing.Union[None, Nullable, uint]' = None + @dataclass - class ErrorStateStruct(ClusterObject): + class GetSceneMembership(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetSceneMembershipResponse' + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="errorStateID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="errorStateLabel", Tag=1, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="errorStateDetails", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - errorStateID: 'uint' = 0 - errorStateLabel: 'typing.Optional[str]' = None - errorStateDetails: 'typing.Optional[str]' = None + groupID: 'uint' = 0 @dataclass - class OperationalStateStruct(ClusterObject): + class GetSceneMembershipResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="operationalStateID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="operationalStateLabel", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="capacity", Tag=1, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="groupID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneList", Tag=3, Type=typing.Optional[typing.List[uint]]), ]) - operationalStateID: 'uint' = 0 - operationalStateLabel: 'typing.Optional[str]' = None + status: 'uint' = 0 + capacity: 'typing.Union[Nullable, uint]' = NullValue + groupID: 'uint' = 0 + sceneList: 'typing.Optional[typing.List[uint]]' = None - class Commands: @dataclass - class Pause(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000000 + class EnhancedAddScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + response_type: typing.ClassVar[str] = 'EnhancedAddSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneName", Tag=3, Type=str), + ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=4, Type=typing.List[ScenesManagement.Structs.ExtensionFieldSet]), ]) + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'uint' = 0 + sceneName: 'str' = "" + extensionFieldSets: 'typing.List[ScenesManagement.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) + @dataclass - class Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + class EnhancedAddSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000040 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + @dataclass - class Start(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000002 + class EnhancedViewScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + response_type: typing.ClassVar[str] = 'EnhancedViewSceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + @dataclass - class Resume(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000003 + class EnhancedViewSceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000041 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sceneName", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=5, Type=typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]), + ]) + + status: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'typing.Optional[uint]' = None + sceneName: 'typing.Optional[str]' = None + extensionFieldSets: 'typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]' = None + + @dataclass + class CopyScene(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'OperationalCommandResponse' + response_type: typing.ClassVar[str] = 'CopySceneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupIdentifierFrom", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="groupIdentifierTo", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneIdentifierTo", Tag=4, Type=uint), ]) + mode: 'uint' = 0 + groupIdentifierFrom: 'uint' = 0 + sceneIdentifierFrom: 'uint' = 0 + groupIdentifierTo: 'uint' = 0 + sceneIdentifierTo: 'uint' = 0 + @dataclass - class OperationalCommandResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000004 + class CopySceneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000062 + command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @@ -20696,17 +20703,21 @@ class OperationalCommandResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupIdentifierFrom", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), ]) - commandResponseState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + status: 'uint' = 0 + groupIdentifierFrom: 'uint' = 0 + sceneIdentifierFrom: 'uint' = 0 class Attributes: @dataclass - class PhaseList(ClusterAttributeDescriptor): + class SceneCount(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20714,15 +20725,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[str]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[Nullable, typing.List[str]]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class CurrentPhase(ClusterAttributeDescriptor): + class CurrentScene(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20730,15 +20741,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: 'typing.Optional[uint]' = None @dataclass - class CountdownTime(ClusterAttributeDescriptor): + class CurrentGroup(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20746,15 +20757,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[uint]' = None @dataclass - class OperationalStateList(ClusterAttributeDescriptor): + class SceneValid(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20762,15 +20773,15 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: 'typing.Optional[bool]' = None @dataclass - class OperationalState(ClusterAttributeDescriptor): + class NameSupport(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20783,10 +20794,10 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class OperationalError(ClusterAttributeDescriptor): + class LastConfiguredBy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20794,15 +20805,47 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=RvcOperationalState.Structs.ErrorStateStruct) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class SceneTableSize(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000062 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class FabricSceneInfo(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000062 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[ScenesManagement.Structs.SceneInfoStruct]) + + value: 'typing.List[ScenesManagement.Structs.SceneInfoStruct]' = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20818,7 +20861,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20834,7 +20877,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20850,7 +20893,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20866,7 +20909,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20882,7 +20925,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -20894,49 +20937,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 - class Events: - @dataclass - class OperationalError(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000061 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), - ]) - - errorState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) - - @dataclass - class OperationCompletion(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000061 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="completionErrorCode", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="totalOperationalTime", Tag=1, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="pausedTime", Tag=2, Type=typing.Union[None, Nullable, uint]), - ]) - - completionErrorCode: 'uint' = 0 - totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None - pausedTime: 'typing.Union[None, Nullable, uint]' = None - @dataclass class HepaFilterMonitoring(Cluster): diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 7f17d80b9391e6..9388432381ef69 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -40,7 +40,7 @@ PowerSourceConfiguration, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode, - RvcOperationalState, RvcRunMode, Scenes, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator, + RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration, ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization, TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, UnitTesting, UserLabel, @@ -64,7 +64,7 @@ Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode, - RvcOperationalState, RvcRunMode, Scenes, SmokeCoAlarm, SoftwareDiagnostics, + RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration, ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization, TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 1b1813a16511b9..611851a064c183 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8271,6 +8271,7 @@ - DeviceEnergyManagement - ElectricalEnergyMeasurement - EnergyPreference + - ScenesManagement attributes: NetworkCommissioning: # Targeting Spring 2024 Matter release @@ -8528,6 +8529,11 @@ Feature: Watermarks: WaterMarks removed: + clusters: + # Should never have been exposed in the shape it was in, and now is + # getting renamed and getting a new cluster id, so just removing it + # seems like the most sensible thing. + - Scenes enum values: ContentLauncher: # The URLNotAvailable value got renamed at the same time diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index c207685fabade6..9aad3593d44f7e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -86,57 +86,6 @@ static BOOL AttributeIsSpecifiedInGroupsCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInScenesCluster(AttributeId aAttributeId) -{ - using namespace Clusters::Scenes; - switch (aAttributeId) { - case Attributes::SceneCount::Id: { - return YES; - } - case Attributes::CurrentScene::Id: { - return YES; - } - case Attributes::CurrentGroup::Id: { - return YES; - } - case Attributes::SceneValid::Id: { - return YES; - } - case Attributes::NameSupport::Id: { - return YES; - } - case Attributes::LastConfiguredBy::Id: { - return YES; - } - case Attributes::SceneTableSize::Id: { - return YES; - } - case Attributes::FabricSceneInfo::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInOnOffCluster(AttributeId aAttributeId) { using namespace Clusters::OnOff; @@ -2732,6 +2681,57 @@ static BOOL AttributeIsSpecifiedInRVCOperationalStateCluster(AttributeId aAttrib } } } +static BOOL AttributeIsSpecifiedInScenesManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ScenesManagement; + switch (aAttributeId) { + case Attributes::SceneCount::Id: { + return YES; + } + case Attributes::CurrentScene::Id: { + return YES; + } + case Attributes::CurrentGroup::Id: { + return YES; + } + case Attributes::SceneValid::Id: { + return YES; + } + case Attributes::NameSupport::Id: { + return YES; + } + case Attributes::LastConfiguredBy::Id: { + return YES; + } + case Attributes::SceneTableSize::Id: { + return YES; + } + case Attributes::FabricSceneInfo::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInHEPAFilterMonitoringCluster(AttributeId aAttributeId) { using namespace Clusters::HepaFilterMonitoring; @@ -6297,9 +6297,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::Groups::Id: { return AttributeIsSpecifiedInGroupsCluster(aAttributeId); } - case Clusters::Scenes::Id: { - return AttributeIsSpecifiedInScenesCluster(aAttributeId); - } case Clusters::OnOff::Id: { return AttributeIsSpecifiedInOnOffCluster(aAttributeId); } @@ -6465,6 +6462,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::RvcOperationalState::Id: { return AttributeIsSpecifiedInRVCOperationalStateCluster(aAttributeId); } + case Clusters::ScenesManagement::Id: { + return AttributeIsSpecifiedInScenesManagementCluster(aAttributeId); + } case Clusters::HepaFilterMonitoring::Id: { return AttributeIsSpecifiedInHEPAFilterMonitoringCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 8c7df4c32cf1b0..3a652b6567045a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -228,131 +228,6 @@ static id _Nullable DecodeAttributeValueForGroupsCluster(AttributeId aAttributeI *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Scenes; - switch (aAttributeId) { - case Attributes::SceneCount::Id: { - using TypeInfo = Attributes::SceneCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::CurrentScene::Id: { - using TypeInfo = Attributes::CurrentScene::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::CurrentGroup::Id: { - using TypeInfo = Attributes::CurrentGroup::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::SceneValid::Id: { - using TypeInfo = Attributes::SceneValid::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::NameSupport::Id: { - using TypeInfo = Attributes::NameSupport::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::LastConfiguredBy::Id: { - using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } - case Attributes::SceneTableSize::Id: { - using TypeInfo = Attributes::SceneTableSize::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::FabricSceneInfo::Id: { - using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRScenesClusterSceneInfoStruct * newElement_0; - newElement_0 = [MTRScenesClusterSceneInfoStruct new]; - newElement_0.sceneCount = [NSNumber numberWithUnsignedChar:entry_0.sceneCount]; - newElement_0.currentScene = [NSNumber numberWithUnsignedChar:entry_0.currentScene]; - newElement_0.currentGroup = [NSNumber numberWithUnsignedShort:entry_0.currentGroup]; - newElement_0.sceneValid = [NSNumber numberWithBool:entry_0.sceneValid]; - newElement_0.remainingCapacity = [NSNumber numberWithUnsignedChar:entry_0.remainingCapacity]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::OnOff; @@ -7184,6 +7059,131 @@ static id _Nullable DecodeAttributeValueForRVCOperationalStateCluster(AttributeI *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForScenesManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ScenesManagement; + switch (aAttributeId) { + case Attributes::SceneCount::Id: { + using TypeInfo = Attributes::SceneCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CurrentScene::Id: { + using TypeInfo = Attributes::CurrentScene::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CurrentGroup::Id: { + using TypeInfo = Attributes::CurrentGroup::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::SceneValid::Id: { + using TypeInfo = Attributes::SceneValid::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::LastConfiguredBy::Id: { + using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::SceneTableSize::Id: { + using TypeInfo = Attributes::SceneTableSize::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRScenesManagementClusterSceneInfoStruct * newElement_0; + newElement_0 = [MTRScenesManagementClusterSceneInfoStruct new]; + newElement_0.sceneCount = [NSNumber numberWithUnsignedChar:entry_0.sceneCount]; + newElement_0.currentScene = [NSNumber numberWithUnsignedChar:entry_0.currentScene]; + newElement_0.currentGroup = [NSNumber numberWithUnsignedShort:entry_0.currentGroup]; + newElement_0.sceneValid = [NSNumber numberWithBool:entry_0.sceneValid]; + newElement_0.remainingCapacity = [NSNumber numberWithUnsignedChar:entry_0.remainingCapacity]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForHEPAFilterMonitoringCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::HepaFilterMonitoring; @@ -18424,9 +18424,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::Groups::Id: { return DecodeAttributeValueForGroupsCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::Scenes::Id: { - return DecodeAttributeValueForScenesCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::OnOff::Id: { return DecodeAttributeValueForOnOffCluster(aPath.mAttributeId, aReader, aError); } @@ -18592,6 +18589,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::RvcOperationalState::Id: { return DecodeAttributeValueForRVCOperationalStateCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::ScenesManagement::Id: { + return DecodeAttributeValueForScenesManagementCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::HepaFilterMonitoring::Id: { return DecodeAttributeValueForHEPAFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 9854b85861aaaa..0ca9a134e9f8a0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -216,176 +216,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Scenes - * - * Attributes and commands for scene configuration and manipulation. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterScenes : MTRGenericBaseCluster - -/** - * Command AddScene - * - * Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' - */ -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command ViewScene - * - * Retrieves the requested scene entry from its Scene table. - */ -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command RemoveScene - * - * Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table - */ -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command RemoveAllScenes - * - * Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table - */ -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command StoreScene - * - * Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint - */ -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command RecallScene - * - * Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table - */ -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetSceneMembership - * - * Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group - */ -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedAddScene - * - * Allows a scene to be added using a finer scene transition time than the AddScene command. - */ -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command EnhancedViewScene - * - * Allows a scene to be retrieved using a finer scene transition time than the ViewScene command - */ -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command CopyScene - * - * Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. - */ -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRBaseClusterScenes (Availability) - -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster On/Off * @@ -6780,6 +6610,176 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @end +/** + * Cluster Scenes Management + * + * Attributes and commands for scene configuration and manipulation. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterScenesManagement : MTRGenericBaseCluster + +/** + * Command AddScene + * + * Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' + */ +- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ViewScene + * + * Retrieves the requested scene entry from its Scene table. + */ +- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveScene + * + * Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table + */ +- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RemoveAllScenes + * + * Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table + */ +- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StoreScene + * + * Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint + */ +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command RecallScene + * + * Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table + */ +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command GetSceneMembership + * + * Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group + */ +- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnhancedAddScene + * + * Allows a scene to be added using a finer scene transition time than the AddScene command. + */ +- (void)enhancedAddSceneWithParams:(MTRScenesManagementClusterEnhancedAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EnhancedViewScene + * + * Allows a scene to be retrieved using a finer scene transition time than the ViewScene command + */ +- (void)enhancedViewSceneWithParams:(MTRScenesManagementClusterEnhancedViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CopyScene + * + * Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. + */ +- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterScenesManagement (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster HEPA Filter Monitoring * @@ -15846,25 +15846,6 @@ typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { MTRGroupsNameSupportBitmapGroupNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x80, } MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -typedef NS_OPTIONS(uint8_t, MTRScenesCopyModeBitmap) { - MTRScenesCopyModeBitmapCopyAllScenes MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { - MTRScenesCopyModeCopyAllScenes MTR_DEPRECATED("Please use MTRScenesCopyModeBitmapCopyAllScenes", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, -} MTR_DEPRECATED("Please use MTRScenesCopyModeBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); - -typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { - MTRScenesFeatureSceneNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRScenesFeatureExplicit MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRScenesFeatureTableSize MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRScenesFeatureFabricScenes MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint8_t, MTRScenesNameSupportBitmap) { - MTRScenesNameSupportBitmapSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x80, -} MTR_PROVISIONALLY_AVAILABLE; - typedef NS_ENUM(uint8_t, MTROnOffDelayedAllOffEffectVariant) { MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, MTROnOffDelayedAllOffEffectVariantFadeToOffIn0p8Seconds MTR_DEPRECATED("Please use MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x00, @@ -17134,6 +17115,21 @@ typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { MTRRVCOperationalStateOperationalStateDocked MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_OPTIONS(uint8_t, MTRScenesManagementCopyModeBitmap) { + MTRScenesManagementCopyModeBitmapCopyAllScenes MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRScenesManagementFeature) { + MTRScenesManagementFeatureSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRScenesManagementFeatureExplicit MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRScenesManagementFeatureTableSize MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRScenesManagementFeatureFabricScenes MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRScenesManagementNameSupportBitmap) { + MTRScenesManagementNameSupportBitmapSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x80, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringChangeIndication) { MTRHEPAFilterMonitoringChangeIndicationOK MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRHEPAFilterMonitoringChangeIndicationWarning MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -19488,112 +19484,6 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterScenes (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use addSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use viewSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use removeSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use removeAllScenesWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use storeSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use recallSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getSceneMembershipWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use enhancedAddSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use enhancedViewSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use copySceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSceneCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSceneCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSceneCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSceneWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentSceneWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSceneWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentGroupWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentGroupWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentGroupWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSceneValidWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSceneValidWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSceneValidWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNameSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConfiguredByWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastConfiguredByWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConfiguredByWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - @interface MTRBaseClusterOnOff (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index aeed364a5986b8..7d0bda83a36c7e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1377,1229 +1377,6 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterScenes - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterAddSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::AddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterViewSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::ViewScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterViewSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterRemoveSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::RemoveScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterRemoveAllScenesParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::RemoveAllScenes::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveAllScenesResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterStoreSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::StoreScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterStoreSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRScenesClusterRecallSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::RecallScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterGetSceneMembershipParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::GetSceneMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterGetSceneMembershipResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterEnhancedAddSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::EnhancedAddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterEnhancedViewSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::EnhancedViewScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedViewSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesClusterCopySceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::CopyScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterCopySceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterScenes (Deprecated) - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self viewSceneWithParams:params completion: - ^(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self removeSceneWithParams:params completion: - ^(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self removeAllScenesWithParams:params completion: - ^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self storeSceneWithParams:params completion: - ^(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self recallSceneWithParams:params completion: - completionHandler]; -} -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self enhancedAddSceneWithParams:params completion: - ^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self enhancedViewSceneWithParams:params completion: - ^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self copySceneWithParams:params completion: - ^(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSceneCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSceneCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSceneCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentSceneWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentSceneWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentSceneWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentGroupWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentGroupWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentGroupWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSceneValidWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSceneValidWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSceneValidWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNameSupportWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNameSupportWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNameSupportWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLastConfiguredByWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastConfiguredByWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLastConfiguredByWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - @implementation MTRBaseClusterOnOff - (void)offWithCompletion:(MTRStatusCompletion)completion @@ -45795,7 +44572,420 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterDishwasherAlarm + +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDishwasherAlarmClusterResetParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DishwasherAlarm::Commands::Reset::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45806,7 +44996,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45819,7 +45009,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45831,7 +45021,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45842,7 +45032,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45855,7 +45045,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45867,7 +45057,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45878,60 +45068,47 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDishwasherAlarm +@implementation MTRBaseClusterMicrowaveOvenMode -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDishwasherAlarmClusterResetParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherAlarm::Commands::Reset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45940,11 +45117,11 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45954,9 +45131,9 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45965,9 +45142,9 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45976,11 +45153,11 @@ - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45990,9 +45167,9 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46001,9 +45178,9 @@ + (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46012,11 +45189,11 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46026,9 +45203,9 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46037,9 +45214,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46048,11 +45225,11 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46062,9 +45239,9 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46073,9 +45250,9 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46084,11 +45261,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46098,9 +45275,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46109,9 +45286,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46120,11 +45297,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46134,9 +45311,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46145,9 +45322,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46156,11 +45333,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46170,9 +45347,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46181,9 +45358,66 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterMicrowaveOvenControl + +- (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + [self setCookingParametersWithParams:nil completion:completion]; +} +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46192,11 +45426,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46206,9 +45440,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46217,9 +45451,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46228,11 +45462,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46242,9 +45476,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46253,9 +45487,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46264,11 +45498,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46278,9 +45512,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46289,13 +45523,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterMicrowaveOvenMode - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46304,11 +45534,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46318,9 +45548,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46329,9 +45559,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46340,11 +45570,11 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46354,9 +45584,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46367,7 +45597,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46380,7 +45610,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46392,7 +45622,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46403,7 +45633,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46416,7 +45646,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46428,7 +45658,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46439,7 +45669,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46452,7 +45682,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46464,7 +45694,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46475,7 +45705,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46488,7 +45718,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46500,7 +45730,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46511,7 +45741,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46524,7 +45754,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46536,7 +45766,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46547,7 +45777,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46560,7 +45790,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46572,7 +45802,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46583,64 +45813,124 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterMicrowaveOvenControl +@implementation MTRBaseClusterOperationalState -- (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion +- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self setCookingParametersWithParams:nil completion:completion]; + [self pauseWithParams:nil completion:completion]; } -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + params = [[MTROperationalStateClusterPauseParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + using RequestType = OperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion +- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopWithParams:nil completion:completion]; +} +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + params = [[MTROperationalStateClusterStopParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + using RequestType = OperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } +- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self startWithParams:nil completion:completion]; +} +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalStateClusterStartParams + alloc] init]; + } -- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; + [self resumeWithParams:nil completion:completion]; +} +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46649,11 +45939,11 @@ - (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46663,9 +45953,45 @@ - (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46674,9 +46000,9 @@ + (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46685,11 +46011,11 @@ - (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46699,9 +46025,9 @@ - (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46710,9 +46036,9 @@ + (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46721,11 +46047,11 @@ - (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46735,9 +46061,9 @@ - (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46746,9 +46072,9 @@ + (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46757,11 +46083,11 @@ - (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46771,9 +46097,9 @@ - (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46782,9 +46108,9 @@ + (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46793,11 +46119,11 @@ - (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46807,9 +46133,9 @@ - (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46820,7 +46146,7 @@ + (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46833,7 +46159,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46845,7 +46171,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46856,7 +46182,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46869,7 +46195,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46881,7 +46207,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46892,7 +46218,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46905,7 +46231,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46917,7 +46243,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46928,7 +46254,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46941,7 +46267,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46953,7 +46279,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46964,7 +46290,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46977,7 +46303,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46989,7 +46315,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47000,7 +46326,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47013,7 +46339,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47025,7 +46351,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47036,16 +46362,16 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOperationalState +@implementation MTRBaseClusterRVCOperationalState -- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self pauseWithParams:nil completion:completion]; } -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterPauseParams + params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; } @@ -47055,25 +46381,25 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Pause::Type; + using RequestType = RvcOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stopWithParams:nil completion:completion]; } -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterStopParams + params = [[MTRRVCOperationalStateClusterStopParams alloc] init]; } @@ -47083,25 +46409,25 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Stop::Type; + using RequestType = RvcOperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self startWithParams:nil completion:completion]; } -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterStartParams + params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; } @@ -47111,25 +46437,25 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Start::Type; + using RequestType = RvcOperationalState::Commands::Start::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { [self resumeWithParams:nil completion:completion]; } -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterResumeParams + params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; } @@ -47139,21 +46465,21 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Resume::Type; + using RequestType = RvcOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47166,7 +46492,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47178,7 +46504,7 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47189,7 +46515,7 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47202,7 +46528,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47214,7 +46540,7 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47225,7 +46551,7 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47238,7 +46564,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47250,7 +46576,7 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47261,7 +46587,7 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47274,7 +46600,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47286,7 +46612,7 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47297,7 +46623,7 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47310,7 +46636,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47322,7 +46648,7 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47331,9 +46657,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47344,9 +46670,9 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStat - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47356,9 +46682,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47369,7 +46695,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47382,7 +46708,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47394,7 +46720,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47405,7 +46731,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47418,7 +46744,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47430,7 +46756,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47441,7 +46767,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47454,7 +46780,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47466,7 +46792,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47477,7 +46803,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47490,7 +46816,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47502,7 +46828,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47513,7 +46839,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47526,7 +46852,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47538,7 +46864,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47549,7 +46875,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47562,7 +46888,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47574,7 +46900,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47585,16 +46911,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCOperationalState +@implementation MTRBaseClusterScenesManagement -- (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self pauseWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterAddSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::AddScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterAddSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterPauseParams + params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; } @@ -47604,25 +46950,45 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Pause::Type; + using RequestType = ScenesManagement::Commands::ViewScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self stopWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterRemoveSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::RemoveScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterRemoveSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStopParams + params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; } @@ -47632,25 +46998,69 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Stop::Type; + using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterRemoveAllScenesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self startWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterStoreSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::StoreScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterStoreSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStartParams + params = [[MTRScenesManagementClusterRecallSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::RecallScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; } @@ -47660,25 +47070,45 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Start::Type; + using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterGetSceneMembershipResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)enhancedAddSceneWithParams:(MTRScenesManagementClusterEnhancedAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self resumeWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterEnhancedAddSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::EnhancedAddScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterEnhancedAddSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)enhancedViewSceneWithParams:(MTRScenesManagementClusterEnhancedViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterResumeParams + params = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; } @@ -47688,21 +47118,45 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Resume::Type; + using RequestType = ScenesManagement::Commands::EnhancedViewScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterEnhancedViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } +- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRScenesManagementClusterCopySceneParams + alloc] init]; + } -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::CopyScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterCopySceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47711,11 +47165,11 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47725,9 +47179,9 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47736,9 +47190,9 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentScene::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47747,11 +47201,11 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentScene::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47761,9 +47215,9 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentScene::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47772,9 +47226,9 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentGroup::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47783,11 +47237,11 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentGroup::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47797,9 +47251,9 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::CurrentGroup::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47808,9 +47262,9 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSceneValidWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneValid::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47819,11 +47273,11 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneValid::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47833,9 +47287,9 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneValid::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47844,9 +47298,9 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::NameSupport::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47855,11 +47309,47 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ScenesManagement::Attributes::NameSupport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ScenesManagement::Attributes::NameSupport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47869,9 +47359,9 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47880,9 +47370,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47891,11 +47381,11 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalS completion:completion]; } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47905,9 +47395,45 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47918,7 +47444,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47931,7 +47457,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47943,7 +47469,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47954,7 +47480,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47967,7 +47493,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47979,7 +47505,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47990,7 +47516,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48003,7 +47529,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48015,7 +47541,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48026,7 +47552,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48039,7 +47565,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48051,7 +47577,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48062,7 +47588,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48075,7 +47601,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48087,7 +47613,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48098,7 +47624,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48111,7 +47637,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48123,7 +47649,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index ab800aad5bd9be..93cb43e3fa557b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -23,7 +23,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIdentifyID MTR_DEPRECATED("Please use MTRClusterIDTypeIdentifyID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000003, MTRClusterGroupsID MTR_DEPRECATED("Please use MTRClusterIDTypeGroupsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000004, - MTRClusterScenesID MTR_DEPRECATED("Please use MTRClusterIDTypeScenesID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000005, MTRClusterOnOffID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000006, MTRClusterOnOffSwitchConfigurationID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffSwitchConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000007, MTRClusterLevelControlID MTR_DEPRECATED("Please use MTRClusterIDTypeLevelControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000008, @@ -90,7 +89,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterTestClusterID MTR_DEPRECATED("Please use MTRClusterIDTypeUnitTestingID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFFF1FC05, MTRClusterIDTypeIdentifyID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRClusterIDTypeGroupsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRClusterIDTypeScenesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRClusterIDTypeOnOffID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, MTRClusterIDTypeOnOffSwitchConfigurationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRClusterIDTypeLevelControlID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, @@ -146,6 +144,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeMicrowaveOvenControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000005F, MTRClusterIDTypeOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000060, MTRClusterIDTypeRVCOperationalStateID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000061, + MTRClusterIDTypeScenesManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000062, MTRClusterIDTypeHEPAFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000071, MTRClusterIDTypeActivatedCarbonFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000072, MTRClusterIDTypeBooleanStateConfigurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, @@ -289,57 +288,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster Scenes deprecated attribute names - MTRClusterScenesAttributeSceneCountID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeSceneCountID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterScenesAttributeCurrentSceneID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - MTRClusterScenesAttributeCurrentGroupID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000002, - MTRClusterScenesAttributeSceneValidID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeSceneValidID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000003, - MTRClusterScenesAttributeNameSupportID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeNameSupportID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000004, - MTRClusterScenesAttributeLastConfiguredByID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000005, - MTRClusterScenesAttributeGeneratedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterScenesAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterScenesAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterScenesAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterScenesAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster Scenes attributes - MTRAttributeIDTypeClusterScenesAttributeSceneCountID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRAttributeIDTypeClusterScenesAttributeSceneValidID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRAttributeIDTypeClusterScenesAttributeNameSupportID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterScenesAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterScenesAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterScenesAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster OnOff deprecated attribute names MTRClusterOnOffAttributeOnOffID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffAttributeOnOffID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -2550,6 +2498,22 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ScenesManagement attributes + MTRAttributeIDTypeClusterScenesManagementAttributeSceneCountID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterScenesManagementAttributeCurrentSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterScenesManagementAttributeCurrentGroupID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterScenesManagementAttributeSceneValidID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterScenesManagementAttributeNameSupportID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterScenesManagementAttributeLastConfiguredByID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterScenesManagementAttributeSceneTableSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterScenesManagementAttributeFabricSceneInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterScenesManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterScenesManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterScenesManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterScenesManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster HEPAFilterMonitoring attributes MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeDegradationDirectionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, @@ -5730,86 +5694,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterGroupsCommandRemoveAllGroupsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRCommandIDTypeClusterGroupsCommandAddGroupIfIdentifyingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - // Cluster Scenes deprecated command id names - MTRClusterScenesCommandAddSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandAddSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterScenesCommandAddSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandAddSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterScenesCommandViewSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandViewSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - MTRClusterScenesCommandViewSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandViewSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - MTRClusterScenesCommandRemoveSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandRemoveSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000002, - MTRClusterScenesCommandRemoveSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandRemoveSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000002, - MTRClusterScenesCommandRemoveAllScenesID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000003, - MTRClusterScenesCommandRemoveAllScenesResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandRemoveAllScenesResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000003, - MTRClusterScenesCommandStoreSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandStoreSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000004, - MTRClusterScenesCommandStoreSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandStoreSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000004, - MTRClusterScenesCommandRecallSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandRecallSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000005, - MTRClusterScenesCommandGetSceneMembershipID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000006, - MTRClusterScenesCommandGetSceneMembershipResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandGetSceneMembershipResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000006, - MTRClusterScenesCommandEnhancedAddSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000040, - MTRClusterScenesCommandEnhancedAddSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000040, - MTRClusterScenesCommandEnhancedViewSceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000041, - MTRClusterScenesCommandEnhancedViewSceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000041, - MTRClusterScenesCommandCopySceneID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandCopySceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000042, - MTRClusterScenesCommandCopySceneResponseID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterScenesCommandCopySceneResponseID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000042, - - // Cluster Scenes commands - MTRCommandIDTypeClusterScenesCommandAddSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRCommandIDTypeClusterScenesCommandAddSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRCommandIDTypeClusterScenesCommandViewSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRCommandIDTypeClusterScenesCommandViewSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRCommandIDTypeClusterScenesCommandRemoveSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRCommandIDTypeClusterScenesCommandRemoveSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRCommandIDTypeClusterScenesCommandRemoveAllScenesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRCommandIDTypeClusterScenesCommandRemoveAllScenesResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRCommandIDTypeClusterScenesCommandStoreSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRCommandIDTypeClusterScenesCommandStoreSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRCommandIDTypeClusterScenesCommandRecallSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - MTRCommandIDTypeClusterScenesCommandGetSceneMembershipID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, - MTRCommandIDTypeClusterScenesCommandGetSceneMembershipResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, - MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000040, - MTRCommandIDTypeClusterScenesCommandEnhancedAddSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000040, - MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000041, - MTRCommandIDTypeClusterScenesCommandEnhancedViewSceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000041, - MTRCommandIDTypeClusterScenesCommandCopySceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000042, - MTRCommandIDTypeClusterScenesCommandCopySceneResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000042, - // Cluster OnOff deprecated command id names MTRClusterOnOffCommandOffID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterOnOffCommandOffID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -6283,6 +6167,27 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterRVCOperationalStateCommandResumeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000003, MTRCommandIDTypeClusterRVCOperationalStateCommandOperationalCommandResponseID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000004, + // Cluster ScenesManagement commands + MTRCommandIDTypeClusterScenesManagementCommandAddSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterScenesManagementCommandAddSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterScenesManagementCommandViewSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterScenesManagementCommandViewSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterScenesManagementCommandRemoveSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterScenesManagementCommandRemoveSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterScenesManagementCommandRemoveAllScenesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterScenesManagementCommandRemoveAllScenesResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterScenesManagementCommandStoreSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterScenesManagementCommandStoreSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterScenesManagementCommandRecallSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterScenesManagementCommandGetSceneMembershipID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterScenesManagementCommandGetSceneMembershipResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterScenesManagementCommandEnhancedAddSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000040, + MTRCommandIDTypeClusterScenesManagementCommandEnhancedAddSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000040, + MTRCommandIDTypeClusterScenesManagementCommandEnhancedViewSceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000041, + MTRCommandIDTypeClusterScenesManagementCommandEnhancedViewSceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000041, + MTRCommandIDTypeClusterScenesManagementCommandCopySceneID MTR_PROVISIONALLY_AVAILABLE = 0x00000042, + MTRCommandIDTypeClusterScenesManagementCommandCopySceneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000042, + // Cluster HEPAFilterMonitoring commands MTRCommandIDTypeClusterHEPAFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 4169e3f2ff9be8..69f49c206f8881 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -115,69 +115,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Scenes - * Attributes and commands for scene configuration and manipulation. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRClusterScenes : MTRGenericCluster - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (NSDictionary * _Nullable)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRClusterScenes (Availability) - -/** - * For all instance methods that take a completion (i.e. command invocations), - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster On/Off * Attributes and commands for switching devices between 'On' and 'Off' states. @@ -3210,6 +3147,69 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @end +/** + * Cluster Scenes Management + * Attributes and commands for scene configuration and manipulation. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterScenesManagement : MTRGenericCluster + +- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enhancedAddSceneWithParams:(MTRScenesManagementClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)enhancedViewSceneWithParams:(MTRScenesManagementClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterScenesManagement (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster HEPA Filter Monitoring * Attributes and commands for monitoring HEPA filters in a device @@ -7255,24 +7255,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use addGroupIfIdentifyingWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -@interface MTRClusterScenes (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use addSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use viewSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use removeSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use removeAllScenesWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use storeSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use recallSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use getSceneMembershipWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use enhancedAddSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use enhancedViewSceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use copySceneWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - @interface MTRClusterOnOff (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 6b71834a8338b3..977b82c6796e36 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -429,49 +429,26 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa } @end -@implementation MTRClusterScenes +@implementation MTRClusterOnOff -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRScenesClusterAddSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::AddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterViewSceneParams + params = [[MTROnOffClusterOffParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::ViewScene::Type; + using RequestType = OnOff::Commands::Off::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -480,52 +457,29 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedVa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterViewSceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRScenesClusterRemoveSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::RemoveScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterRemoveAllScenesParams + params = [[MTROnOffClusterOnParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::RemoveAllScenes::Type; + using RequestType = OnOff::Commands::On::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -534,42 +488,19 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveAllScenesResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRScenesClusterStoreSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::StoreScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterStoreSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterRecallSceneParams + params = [[MTROnOffClusterToggleParams alloc] init]; } @@ -579,7 +510,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expect auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::RecallScene::Type; + using RequestType = OnOff::Commands::Toggle::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -593,20 +524,20 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expect completion:responseHandler]; } -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterGetSceneMembershipParams + params = [[MTROnOffClusterOffWithEffectParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::GetSceneMembership::Type; + using RequestType = OnOff::Commands::OffWithEffect::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -615,52 +546,29 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterGetSceneMembershipResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRScenesClusterEnhancedAddSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Scenes::Commands::EnhancedAddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterEnhancedViewSceneParams + params = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::EnhancedViewScene::Type; + using RequestType = OnOff::Commands::OnWithRecallGlobalScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -669,25 +577,25 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedViewSceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterCopySceneParams + params = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Scenes::Commands::CopyScene::Type; + using RequestType = OnOff::Commands::OnWithTimedOff::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -696,210 +604,226 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedVa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterCopySceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) params:params]; + [self writeAttributeOnTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } +- (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOffWaitTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpOnOffWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterScenes (Deprecated) +@implementation MTRClusterOnOff (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self addSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self offWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self viewSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self removeSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self onWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self removeAllScenesWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self storeSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self toggleWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)toggleWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self recallSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self getSceneMembershipWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self offWithEffectWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self enhancedAddSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self onWithRecallGlobalSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self enhancedViewSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - [self copySceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self onWithTimedOffWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } @end -@implementation MTRClusterOnOff +@implementation MTRClusterOnOffSwitchConfiguration -- (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params { - [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; } -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::Off::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; } -- (void)onWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self writeAttributeSwitchActionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterOnOffSwitchConfiguration (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterLevelControl + +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROnOffClusterOnParams + params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; } @@ -909,7 +833,7 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues: auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::On::Type; + using RequestType = LevelControl::Commands::MoveToLevel::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -923,14 +847,37 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues: completion:responseHandler]; } -- (void)toggleWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + if (params == nil) { + params = [[MTRLevelControlClusterMoveParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::Move::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROnOffClusterToggleParams + params = [[MTRLevelControlClusterStepParams alloc] init]; } @@ -940,7 +887,7 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expecte auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::Toggle::Type; + using RequestType = LevelControl::Commands::Step::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -954,10 +901,10 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expecte completion:responseHandler]; } -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROnOffClusterOffWithEffectParams + params = [[MTRLevelControlClusterStopParams alloc] init]; } @@ -967,7 +914,7 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params exp auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::OffWithEffect::Type; + using RequestType = LevelControl::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -981,14 +928,37 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params exp completion:responseHandler]; } -- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + if (params == nil) { + params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROnOffClusterOnWithRecallGlobalSceneParams + params = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; } @@ -998,7 +968,7 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::OnWithRecallGlobalScene::Type; + using RequestType = LevelControl::Commands::MoveWithOnOff::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -1012,10 +982,10 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen completion:responseHandler]; } -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROnOffClusterOnWithTimedOffParams + params = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; } @@ -1025,7 +995,7 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params e auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OnOff::Commands::OnWithTimedOff::Type; + using RequestType = LevelControl::Commands::StepWithOnOff::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -1039,535 +1009,135 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params e completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeOnOffWithParams:(MTRReadParams * _Nullable)params +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnOffID) params:params]; + if (params == nil) { + params = [[MTRLevelControlClusterStopWithOnOffParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::StopWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeGlobalSceneControlWithParams:(MTRReadParams * _Nullable)params +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGlobalSceneControlID) params:params]; + if (params == nil) { + params = [[MTRLevelControlClusterMoveToClosestFrequencyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeOnTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; } -- (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeOnTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; } -- (void)writeAttributeOnTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOffWaitTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; } -- (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeOffWaitTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; } -- (void)writeAttributeOffWaitTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params + +- (NSDictionary * _Nullable)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; +} - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOffWaitTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpOnOffWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeStartUpOnOffWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeOptionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; + [self writeAttributeOnOffTransitionTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterOnOff (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self offWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)offWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self offWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)onWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self toggleWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)toggleWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self toggleWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self offWithEffectWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithRecallGlobalSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)onWithRecallGlobalSceneWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithRecallGlobalSceneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithTimedOffWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -@end - -@implementation MTRClusterOnOffSwitchConfiguration - -- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; -} - -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSwitchActionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterOnOffSwitchConfiguration (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRClusterLevelControl - -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveToLevelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveToLevel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::Move::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStepParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStepWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::StepWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStopWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::StopWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveToClosestFrequencyParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRemainingTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeRemainingTimeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinLevelID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxLevelID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentFrequencyWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeCurrentFrequencyID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinFrequencyWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMinFrequencyID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxFrequencyWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeMaxFrequencyID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOptionsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) params:params]; -} - -- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOptionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOptionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOptionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnOffTransitionTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) params:params]; -} - -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnOffTransitionTimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnOffTransitionTimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnLevelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeOnLevelID) params:params]; -} - -- (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeOnLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - (void)writeAttributeOnLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { @@ -5398,166 +4968,469 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSoftwareVersionStringID) params:params]; } -- (NSDictionary * _Nullable)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeManufacturingDateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; +} + +@end +@implementation MTRClusterBridgedDeviceBasic +@end + +@implementation MTRClusterBridgedDeviceBasic (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterSwitch + +- (NSDictionary * _Nullable)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterSwitch (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterAdministratorCommissioning + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeManufacturingDateID) params:params]; + [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributePartNumberWithParams:(MTRReadParams * _Nullable)params +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributePartNumberID) params:params]; -} + if (params == nil) { + params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeProductURLWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductURLID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeProductLabelWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductLabelID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } -- (NSDictionary * _Nullable)readAttributeSerialNumberWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeSerialNumberID) params:params]; + using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeReachableWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeReachableID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; } -- (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; } -@end -@implementation MTRClusterBridgedDeviceBasic @end -@implementation MTRClusterBridgedDeviceBasic (Deprecated) +@implementation MTRClusterAdministratorCommissioning (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -@end - -@implementation MTRClusterSwitch - -- (NSDictionary * _Nullable)readAttributeNumberOfPositionsWithParams:(MTRReadParams * _Nullable)params +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeNumberOfPositionsID) params:params]; + [self openCommissioningWindowWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeCurrentPositionWithParams:(MTRReadParams * _Nullable)params +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeCurrentPositionID) params:params]; + [self openBasicCommissioningWindowWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeMultiPressMaxWithParams:(MTRReadParams * _Nullable)params +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID) params:params]; + [self revokeCommissioningWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)revokeCommissioningWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID) params:params]; + [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; } +@end -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; -} +@implementation MTRClusterOperationalCredentials -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; + if (params == nil) { + params = [[MTROperationalCredentialsClusterAttestationRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; + if (params == nil) { + params = [[MTROperationalCredentialsClusterCertificateChainRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID) params:params]; + if (params == nil) { + params = [[MTROperationalCredentialsClusterCSRRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::CSRRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCSRResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID) params:params]; -} + if (params == nil) { + params = [[MTROperationalCredentialsClusterAddNOCParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRClusterSwitch (Deprecated) + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using RequestType = OperationalCredentials::Commands::AddNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -@end +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterUpdateNOCParams + alloc] init]; + } -@implementation MTRClusterAdministratorCommissioning + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams + params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; + using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5566,28 +5439,25 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams + params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; + using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5596,19 +5466,15 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)revokeCommissioningWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams + params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; } @@ -5617,11 +5483,8 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; + using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5635,97 +5498,154 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeWindowStatusWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeWindowStatusID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAdminFabricIndexWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminFabricIndexID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAdminVendorIdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterAdministratorCommissioning (Deprecated) +@implementation MTRClusterOperationalCredentials (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self openCommissioningWindowWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self attestationRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self openBasicCommissioningWindowWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self certificateChainRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self revokeCommissioningWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + [self CSRRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)revokeCommissioningWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self revokeCommissioningWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; + [self addNOCWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self updateNOCWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self updateFabricLabelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeFabricWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addTrustedRootCertificateWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; } @end -@implementation MTRClusterOperationalCredentials +@implementation MTRClusterGroupKeyManagement -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROperationalCredentialsClusterAttestationRequestParams + params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; + using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5734,15 +5654,15 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalCredentialsClusterCertificateChainRequestParams + params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; } @@ -5752,7 +5672,7 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; + using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5761,25 +5681,25 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class + responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROperationalCredentialsClusterCSRRequestParams + params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalCredentials::Commands::CSRRequest::Type; + using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5788,15 +5708,19 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCSRResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)keySetReadAllIndicesWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self keySetReadAllIndicesWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalCredentialsClusterAddNOCParams + params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; } @@ -5806,7 +5730,7 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalCredentials::Commands::AddNOC::Type; + using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -5815,284 +5739,270 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateNOCParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeGroupKeyMapWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} - using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; } -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (NSDictionary * _Nullable)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; +} - using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; } -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTROperationalCredentialsClusterRemoveFabricParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +@end - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRClusterGroupKeyManagement (Deprecated) - using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler { - if (params == nil) { - params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams - alloc] init]; - } + [self keySetWriteWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetRemoveWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadAllIndicesWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +@end - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +@implementation MTRClusterFixedLabel - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; +} - using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeNOCsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedFabricsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeSupportedFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCommissionedFabricsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCommissionedFabricsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; } -- (NSDictionary * _Nullable)readAttributeTrustedRootCertificatesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeTrustedRootCertificatesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentFabricIndexWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterFixedLabel (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID) params:params]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterUserLabel + +- (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; +} + +- (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLabelListWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOperationalCredentials (Deprecated) +@implementation MTRClusterUserLabel (Deprecated) - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self attestationRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +@end + +@implementation MTRClusterBooleanState + +- (NSDictionary * _Nullable)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params { - [self certificateChainRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; } -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self CSRRequestWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; } -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self addNOCWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; } -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - [self updateNOCWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; } -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - [self updateFabricLabelWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; } -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - [self removeFabricWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; } -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - [self addTrustedRootCertificateWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; } + @end -@implementation MTRClusterGroupKeyManagement +@implementation MTRClusterBooleanState (Deprecated) -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetWriteParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@end - using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRClusterICDManagement -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadParams + params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; } @@ -6102,7 +6012,7 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; + using RequestType = IcdManagement::Commands::RegisterClient::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6111,15 +6021,15 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class + responseClass:MTRICDManagementClusterRegisterClientResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetRemoveParams + params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; } @@ -6129,7 +6039,7 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; + using RequestType = IcdManagement::Commands::UnregisterClient::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6143,14 +6053,14 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * completion:responseHandler]; } -- (void)keySetReadAllIndicesWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self keySetReadAllIndicesWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self stayActiveRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams + params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; } @@ -6160,7 +6070,7 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; + using RequestType = IcdManagement::Commands::StayActiveRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6169,270 +6079,290 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class + responseClass:MTRICDManagementClusterStayActiveResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) params:params]; -} - -- (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeGroupKeyMapWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupKeyMapID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGroupTableID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxGroupsPerFabricWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupsPerFabricID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxGroupKeysPerFabricWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; } -@end - -@implementation MTRClusterGroupKeyManagement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID) params:params]; } -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetWriteWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self keySetReadWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetRemoveWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params { - [self keySetReadAllIndicesWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID) params:params]; } -@end -@implementation MTRClusterFixedLabel - -- (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterFixedLabel (Deprecated) +@implementation MTRClusterTimer -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} + if (params == nil) { + params = [[MTRTimerClusterSetTimerParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -@implementation MTRClusterUserLabel + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeLabelListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) params:params]; + using RequestType = Timer::Commands::SetTimer::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)resetTimerWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self writeAttributeLabelListWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self resetTimerWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)writeAttributeLabelListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; + if (params == nil) { + params = [[MTRTimerClusterResetTimerParams + alloc] init]; + } - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeLabelListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; + using RequestType = Timer::Commands::ResetTimer::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; -} + if (params == nil) { + params = [[MTRTimerClusterAddTimeParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::AddTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID) params:params]; + if (params == nil) { + params = [[MTRTimerClusterReduceTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::ReduceTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSetTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeSetTimeID) params:params]; } -@end - -@implementation MTRClusterUserLabel (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (NSDictionary * _Nullable)readAttributeTimeRemainingWithParams:(MTRReadParams * _Nullable)params { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID) params:params]; } -@end - -@implementation MTRClusterBooleanState - -- (NSDictionary * _Nullable)readAttributeStateValueWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTimerStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimerStateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterBooleanState (Deprecated) +@implementation MTRClusterOvenCavityOperationalState -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterPauseParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRClusterICDManagement + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion + using RequestType = OvenCavityOperationalState::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterRegisterClientParams + params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; } @@ -6442,7 +6372,7 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::RegisterClient::Type; + using RequestType = OvenCavityOperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6451,25 +6381,29 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterRegisterClientResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterUnregisterClientParams + params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::UnregisterClient::Type; + using RequestType = OvenCavityOperationalState::Commands::Start::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6478,19 +6412,19 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self stayActiveRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterStayActiveRequestParams + params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; } @@ -6500,7 +6434,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::StayActiveRequest::Type; + using RequestType = OvenCavityOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6509,94 +6443,237 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterStayActiveResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeIdleModeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeActiveModeDurationWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeDurationID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID) params:params]; } -- (NSDictionary * _Nullable)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeActiveModeThresholdID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeRegisteredClientsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeICDCounterWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeICDCounterID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterOvenMode + +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) params:params]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) params:params]; +} + +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClientsSupportedPerFabricWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterLaundryDryerControls + +- (NSDictionary * _Nullable)readAttributeSupportedDrynessLevelsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClientsSupportedPerFabricID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerHintWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedDrynessLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerHintID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) params:params]; } -- (NSDictionary * _Nullable)readAttributeUserActiveModeTriggerInstructionWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeUserActiveModeTriggerInstructionID) params:params]; + [self writeAttributeSelectedDrynessLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeOperatingModeWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeOperatingModeID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterTimer +@implementation MTRClusterModeSelect -- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRTimerClusterSetTimerParams + params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; } @@ -6606,7 +6683,7 @@ - (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValue auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Timer::Commands::SetTimer::Type; + using RequestType = ModeSelect::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6620,241 +6697,110 @@ - (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params expectedValue completion:responseHandler]; } -- (void)resetTimerWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self resetTimerWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRTimerClusterResetTimerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Timer::Commands::ResetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; } -- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRTimerClusterAddTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Timer::Commands::AddTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; } -- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRTimerClusterReduceTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Timer::Commands::ReduceTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSetTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeSetTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeTimeRemainingWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimeRemainingID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeTimerStateWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeTimerStateID) params:params]; + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID) params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeFeatureMapID) params:params]; -} + NSNumber * timedWriteTimeout = params.timedWriteTimeout; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID) params:params]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -@end - -@implementation MTRClusterOvenCavityOperationalState - -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; } -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; } -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenCavityOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; } -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterStartParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +@end + +@implementation MTRClusterModeSelect (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeToModeWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +@end + +@implementation MTRClusterLaundryWasherMode + +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterResumeParams + params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; } @@ -6864,7 +6810,7 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenCavityOperationalState::Commands::Resume::Type; + using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6873,79 +6819,91 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateListID) params:params]; + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID) params:params]; + [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOvenMode +@implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROvenModeClusterChangeToModeParams + params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; } @@ -6955,7 +6913,7 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params ex auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenMode::Commands::ChangeToMode::Type; + using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -6964,24 +6922,24 @@ - (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params ex expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenModeClusterChangeToModeResponseParams.class + responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; } - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -6992,12 +6950,12 @@ - (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataV { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7008,112 +6966,133 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterLaundryDryerControls +@implementation MTRClusterLaundryWasherControls -- (NSDictionary * _Nullable)readAttributeSupportedDrynessLevelsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSupportedDrynessLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSelectedDrynessLevelWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeSelectedDrynessLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; +} + +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterModeSelect +@implementation MTRClusterRVCRunMode -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRModeSelectClusterChangeToModeParams + params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ModeSelect::Commands::ChangeToMode::Type; + using RequestType = RvcRunMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7122,50 +7101,24 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStandardNamespaceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStandardNamespaceID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeCurrentModeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7176,61 +7129,47 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterModeSelect (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; } -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self changeToModeWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} @end -@implementation MTRClusterLaundryWasherMode +@implementation MTRClusterRVCCleanMode -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRLaundryWasherModeClusterChangeToModeParams + params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; } @@ -7240,7 +7179,7 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7249,40 +7188,24 @@ - (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeSupportedModesID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeCurrentModeID) params:params]; + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; } -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7293,57 +7216,61 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRefrigeratorAndTemperatureControlledCabinetMode +@implementation MTRClusterTemperatureControl -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)setTemperatureWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self setTemperatureWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + using RequestType = TemperatureControl::Commands::SetTemperature::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7352,167 +7279,128 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; } -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; } -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterLaundryWasherControls - -- (NSDictionary * _Nullable)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedsID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) params:params]; -} - -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSpinSpeedCurrentID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} +@implementation MTRClusterRefrigeratorAlarm -- (NSDictionary * _Nullable)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeNumberOfRinsesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedRinsesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCRunMode +@implementation MTRClusterDishwasherMode -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCRunModeClusterChangeToModeParams + params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; } @@ -7522,7 +7410,7 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcRunMode::Commands::ChangeToMode::Type; + using RequestType = DishwasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7531,24 +7419,40 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class + responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; } - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs @@ -7559,138 +7463,90 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCCleanMode - -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCCleanModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeSupportedModesID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) params:params]; -} +@implementation MTRClusterAirQuality -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterTemperatureControl +@implementation MTRClusterSmokeCOAlarm -- (void)setTemperatureWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self setTemperatureWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self selfTestRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRTemperatureControlClusterSetTemperatureParams + params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; } @@ -7700,7 +7556,7 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = TemperatureControl::Commands::SetTemperature::Type; + using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7714,133 +7570,130 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeTemperatureSetpointWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinTemperatureWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxTemperatureWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeMaxTemperatureID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStepWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeStepID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSelectedTemperatureLevelWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSelectedTemperatureLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSupportedTemperatureLevelsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; } -@end - -@implementation MTRClusterRefrigeratorAlarm - -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeMaskID) params:params]; + [self writeAttributeSmokeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } - -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeStateID) params:params]; + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterDishwasherMode +@implementation MTRClusterDishwasherAlarm -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDishwasherModeClusterChangeToModeParams + params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherMode::Commands::ChangeToMode::Type; + using RequestType = DishwasherAlarm::Commands::Reset::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -7849,134 +7702,144 @@ - (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeSupportedModesID) params:params]; -} + if (params == nil) { + params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeCurrentModeID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; } -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; } -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterAirQuality +@implementation MTRClusterMicrowaveOvenMode -- (NSDictionary * _Nullable)readAttributeAirQualityWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterSmokeCOAlarm +@implementation MTRClusterMicrowaveOvenControl -- (void)selfTestRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)setCookingParametersWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - [self selfTestRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self setCookingParametersWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams + params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; } @@ -7986,7 +7849,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; + using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8000,130 +7863,110 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeExpressedStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpressedStateID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSmokeStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeStateID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCOStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeCOStateID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeBatteryAlertWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeBatteryAlertID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDeviceMutedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeDeviceMutedID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTestInProgressWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeTestInProgressID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeHardwareFaultAlertWithParams:(MTRReadParams * _Nullable)params +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeHardwareFaultAlertID) params:params]; -} + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeEndOfServiceAlertWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEndOfServiceAlertID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeInterconnectSmokeAlarmWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectSmokeAlarmID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeInterconnectCOAlarmWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeInterconnectCOAlarmID) params:params]; + using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeContaminationStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeContaminationStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSmokeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeSmokeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeSmokeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; } -- (NSDictionary * _Nullable)readAttributeExpiryDateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterDishwasherAlarm +@implementation MTRClusterOperationalState -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRDishwasherAlarmClusterResetParams + params = [[MTROperationalStateClusterPauseParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherAlarm::Commands::Reset::Type; + using RequestType = OperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8132,25 +7975,29 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params expectedV expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + params = [[MTROperationalStateClusterStopParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; + using RequestType = OperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8159,127 +8006,217 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeMaskWithParams:(MTRReadParams * _Nullable)params +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeMaskID) params:params]; + [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeLatchWithParams:(MTRReadParams * _Nullable)params +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeLatchID) params:params]; -} + if (params == nil) { + params = [[MTROperationalStateClusterStartParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeStateWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeStateID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeSupportedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID) params:params]; + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID) params:params]; + [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; + if (params == nil) { + params = [[MTROperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; } -@end - -@implementation MTRClusterMicrowaveOvenMode - -- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeSupportedModesID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterRVCOperationalState + +- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterPauseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRVCOperationalStateClusterStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcOperationalState::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -@end - -@implementation MTRClusterMicrowaveOvenControl - -- (void)setCookingParametersWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self setCookingParametersWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + using RequestType = RvcOperationalState::Commands::Start::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8288,25 +8225,29 @@ - (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCooking expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + using RequestType = RvcOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8315,78 +8256,79 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOperationalState +@implementation MTRClusterScenesManagement -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterPauseParams + params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; } @@ -8396,7 +8338,7 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Pause::Type; + using RequestType = ScenesManagement::Commands::AddScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8405,19 +8347,15 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterAddSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterStopParams + params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; } @@ -8427,7 +8365,7 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Stop::Type; + using RequestType = ScenesManagement::Commands::ViewScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8436,19 +8374,15 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterStartParams + params = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; } @@ -8458,7 +8392,7 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Start::Type; + using RequestType = ScenesManagement::Commands::RemoveScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8467,19 +8401,15 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterRemoveSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterResumeParams + params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; } @@ -8489,7 +8419,7 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Resume::Type; + using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8498,83 +8428,69 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterRemoveAllScenesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; -} + if (params == nil) { + params = [[MTRScenesManagementClusterStoreSceneParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; + using RequestType = ScenesManagement::Commands::StoreScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterStoreSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; -} + if (params == nil) { + params = [[MTRScenesManagementClusterRecallSceneParams + alloc] init]; + } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) params:params]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; + using RequestType = ScenesManagement::Commands::RecallScene::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -@end - -@implementation MTRClusterRVCOperationalState - -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterPauseParams + params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; } @@ -8584,7 +8500,7 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Pause::Type; + using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8593,19 +8509,15 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterGetSceneMembershipResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)enhancedAddSceneWithParams:(MTRScenesManagementClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStopParams + params = [[MTRScenesManagementClusterEnhancedAddSceneParams alloc] init]; } @@ -8615,7 +8527,7 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Stop::Type; + using RequestType = ScenesManagement::Commands::EnhancedAddScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8624,19 +8536,15 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterEnhancedAddSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)enhancedViewSceneWithParams:(MTRScenesManagementClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterStartParams + params = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; } @@ -8646,7 +8554,7 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Start::Type; + using RequestType = ScenesManagement::Commands::EnhancedViewScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8655,19 +8563,15 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterEnhancedViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterResumeParams + params = [[MTRScenesManagementClusterCopySceneParams alloc] init]; } @@ -8677,7 +8581,7 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::Resume::Type; + using RequestType = ScenesManagement::Commands::CopyScene::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -8686,69 +8590,79 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterCopySceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneCountID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeCurrentSceneID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeCurrentGroupID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneValidID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeNameSupportID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeLastConfiguredByID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneTableSizeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFabricSceneInfoID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeGeneratedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeEventListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeClusterRevisionID) params:params]; } @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 09f02d57f5ea12..cb450c7d8272e8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -446,17 +446,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterAddSceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nonnull sceneName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTROnOffClusterOffParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -483,21 +473,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterAddSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterAddSceneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTROnOffClusterOnParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -512,35 +489,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterAddSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTRScenesClusterAddSceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterViewSceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTROnOffClusterToggleParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -567,27 +529,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterViewSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterViewSceneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTROnOffClusterOffWithEffectParams : NSObject -@property (nonatomic, copy) NSString * _Nullable sceneName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull effectIdentifier MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull effectVariant MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -602,35 +549,25 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterViewSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterViewSceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTROnOffClusterOffWithEffectParams (Deprecated) -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull effectId MTR_DEPRECATED("Please use effectIdentifier", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterRemoveSceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -657,21 +594,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterRemoveSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterRemoveSceneResponseParams : NSObject +@interface MTROnOffClusterOnWithTimedOffParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull onOffControl MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull onTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull offWaitTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -686,33 +616,28 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterRemoveSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterRemoveSceneResponseParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRLevelControlClusterMoveToLevelParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull level MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterRemoveAllScenesParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -739,17 +664,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterRemoveAllScenesParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRLevelControlClusterMoveParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -764,33 +688,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterRemoveAllScenesResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterRemoveAllScenesResponseParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRLevelControlClusterStepParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterStoreSceneParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -817,21 +738,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterStoreSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterStoreSceneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRLevelControlClusterStopParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -846,37 +758,28 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterStoreSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTRScenesClusterStoreSceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterRecallSceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull level MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -903,17 +806,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterRecallSceneParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nullable rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterGetSceneMembershipParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -940,21 +842,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterGetSceneMembershipParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject +@interface MTRLevelControlClusterStepWithOnOffParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable capacity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nullable sceneList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -969,39 +868,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterGetSceneMembershipResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterEnhancedAddSceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRLevelControlClusterStopWithOnOffParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull sceneName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1028,21 +912,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterEnhancedAddSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull frequency MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1057,35 +930,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterEnhancedAddSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTRScenesClusterEnhancedAddSceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterEnhancedViewSceneParams : NSObject +@interface MTRActionsClusterInstantActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1112,27 +974,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterEnhancedViewSceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTRActionsClusterInstantActionWithTransitionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nullable sceneName MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1147,41 +996,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterEnhancedViewSceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTRScenesClusterEnhancedViewSceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupId MTR_DEPRECATED("Please use groupID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneId MTR_DEPRECATED("Please use sceneID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterCopySceneParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTRActionsClusterStartActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierTo MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierTo MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1208,25 +1040,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterCopySceneParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom MTR_DEPRECATED("Please use groupIdentifierFrom", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom MTR_DEPRECATED("Please use sceneIdentifierFrom", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull groupIdTo MTR_DEPRECATED("Please use groupIdentifierTo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdTo MTR_DEPRECATED("Please use sceneIdentifierTo", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterCopySceneResponseParams : NSObject +@interface MTRActionsClusterStartActionWithDurationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1241,31 +1062,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRScenesClusterCopySceneResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRScenesClusterCopySceneResponseParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom MTR_DEPRECATED("Please use groupIdentifierFrom", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRActionsClusterStopActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom MTR_DEPRECATED("Please use sceneIdentifierFrom", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterOffParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1293,7 +1107,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterOnParams : NSObject +@interface MTRActionsClusterPauseActionParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1321,7 +1139,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterToggleParams : NSObject +@interface MTRActionsClusterPauseActionWithDurationParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1349,11 +1173,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterOffWithEffectParams : NSObject +@interface MTRActionsClusterResumeActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull effectIdentifier MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull effectVariant MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1380,13 +1204,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTROnOffClusterOffWithEffectParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRActionsClusterEnableActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull effectId MTR_DEPRECATED("Please use effectIdentifier", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterOnWithRecallGlobalSceneParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1414,13 +1237,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROnOffClusterOnWithTimedOffParams : NSObject +@interface MTRActionsClusterEnableActionWithDurationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull onOffControl MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull onTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull offWaitTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1448,15 +1271,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterMoveToLevelParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull level MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRActionsClusterDisableActionParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1484,15 +1303,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterMoveParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRActionsClusterDisableActionWithDurationParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1519,18 +1336,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterStepParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_DEPRECATED("This command has been removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBasicClusterMfgSpecificPingParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1557,12 +1364,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterStopParams : NSObject +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateProviderClusterQueryImageParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull productID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSString * _Nullable location MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSData * _Nullable metadataForProvider MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1589,16 +1408,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterMoveToLevelWithOnOffParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : MTROTASoftwareUpdateProviderClusterQueryImageParams -@property (nonatomic, copy) NSNumber * _Nonnull level MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported MTR_DEPRECATED("The protocolsSupported field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion MTR_DEPRECATED("The hardwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable location MTR_DEPRECATED("The location field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent MTR_DEPRECATED("The requestorCanConsent field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSData * _Nullable metadataForProvider MTR_DEPRECATED("The metadataForProvider field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1625,16 +1448,31 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterMoveWithOnOffParams : NSObject +@interface MTROTASoftwareUpdateProviderClusterQueryImageParams (Deprecated) -@property (nonatomic, copy) NSNumber * _Nonnull moveMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_DEPRECATED("Please use vendorID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable rate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull productId MTR_DEPRECATED("Please use productID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); +@end -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateProviderClusterQueryImageResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSString * _Nullable imageURI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSString * _Nullable softwareVersionString MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSData * _Nullable updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSData * _Nullable metadataForRequestor MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1649,30 +1487,40 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTROTASoftwareUpdateProviderClusterQueryImageResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterStepWithOnOffParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : MTROTASoftwareUpdateProviderClusterQueryImageResponseParams -@property (nonatomic, copy) NSNumber * _Nonnull stepMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_DEPRECATED("The status field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull stepSize MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime MTR_DEPRECATED("The delayedActionTime field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable imageURI MTR_DEPRECATED("The imageURI field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable softwareVersionString MTR_DEPRECATED("The softwareVersionString field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSData * _Nullable updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded MTR_DEPRECATED("The userConsentNeeded field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSData * _Nullable metadataForRequestor MTR_DEPRECATED("The metadataForRequestor field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1687,24 +1535,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterStopWithOnOffParams : NSObject +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull optionsMask MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull optionsOverride MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1731,10 +1570,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRLevelControlClusterMoveToClosestFrequencyParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams -@property (nonatomic, copy) NSNumber * _Nonnull frequency MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion MTR_DEPRECATED("The newVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1761,12 +1602,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterInstantActionParams : NSObject +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull action MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1781,26 +1622,51 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterInstantActionWithTransitionParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull action MTR_DEPRECATED("The action field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime MTR_DEPRECATED("The delayedActionTime field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1827,12 +1693,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterStartActionParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1859,14 +1725,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterStartActionWithDurationParams : NSObject +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull announcementReason MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSData * _Nullable metadataForNode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull endpoint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1893,12 +1763,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterStopActionParams : NSObject +MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull announcementReason MTR_DEPRECATED("The announcementReason field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nullable metadataForNode MTR_DEPRECATED("The metadataForNode field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull endpoint MTR_DEPRECATED("The endpoint field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1925,12 +1797,19 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +@interface MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId MTR_DEPRECATED("Please use providerNodeID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); + +@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_DEPRECATED("Please use vendorID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterPauseActionParams : NSObject +@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull expiryLengthSeconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1958,13 +1837,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterPauseActionWithDurationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -1979,24 +1856,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRGeneralCommissioningClusterArmFailSafeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterResumeActionParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull countryCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2024,11 +1907,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterEnableActionParams : NSObject +@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2043,26 +1926,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterEnableActionWithDurationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2090,11 +1971,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterDisableActionParams : NSObject +@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2109,26 +1990,28 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRGeneralCommissioningClusterCommissioningCompleteResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRActionsClusterDisableActionWithDurationParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull actionID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable invokeID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nullable ssid MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull duration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2155,8 +2038,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_DEPRECATED("This command has been removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBasicClusterMfgSpecificPingParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSArray * _Nullable wiFiScanResults MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSArray * _Nullable threadScanResults MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2171,36 +2062,36 @@ MTR_DEPRECATED("This command has been removed", ios(16.1, 16.4), macos(13.0, 13. * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRNetworkCommissioningClusterScanNetworksResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateProviderClusterQueryImageParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull productID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nonnull ssid MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nonnull credentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nullable location MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nullable networkIdentity MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nullable clientIdentifier MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nullable metadataForProvider MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2227,20 +2118,12 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateProviderClusterQueryImageParams : MTROTASoftwareUpdateProviderClusterQueryImageParams - -@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSArray * _Nonnull protocolsSupported MTR_DEPRECATED("The protocolsSupported field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable hardwareVersion MTR_DEPRECATED("The hardwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSString * _Nullable location MTR_DEPRECATED("The location field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable requestorCanConsent MTR_DEPRECATED("The requestorCanConsent field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull operationalDataset MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSData * _Nullable metadataForProvider MTR_DEPRECATED("The metadataForProvider field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2267,102 +2150,12 @@ MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageParams", @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTROTASoftwareUpdateProviderClusterQueryImageParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_DEPRECATED("Please use vendorID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull productId MTR_DEPRECATED("Please use productID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); -@end - -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateProviderClusterQueryImageResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSString * _Nullable imageURI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSString * _Nullable softwareVersionString MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSData * _Nullable updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSData * _Nullable metadataForRequestor MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -/** - * Initialize an MTROTASoftwareUpdateProviderClusterQueryImageResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterQueryImageResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams : MTROTASoftwareUpdateProviderClusterQueryImageResponseParams - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_DEPRECATED("The status field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable delayedActionTime MTR_DEPRECATED("The delayedActionTime field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSString * _Nullable imageURI MTR_DEPRECATED("The imageURI field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSString * _Nullable softwareVersionString MTR_DEPRECATED("The softwareVersionString field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSData * _Nullable updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable userConsentNeeded MTR_DEPRECATED("The userConsentNeeded field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSData * _Nullable metadataForRequestor MTR_DEPRECATED("The metadataForRequestor field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2389,44 +2182,18 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams : MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams - -@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject -@property (nonatomic, copy, getter=getNewVersion) NSNumber * _Nonnull newVersion MTR_DEPRECATED("The newVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end +@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable networkIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull action MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nullable clientIdentity MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2444,7 +2211,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams with a response-value dictionary + * Initialize an MTRNetworkCommissioningClusterNetworkConfigResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -2457,67 +2224,12 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams : MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams - -@property (nonatomic, copy) NSNumber * _Nonnull action MTR_DEPRECATED("The action field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull delayedActionTime MTR_DEPRECATED("The delayedActionTime field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams : MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull updateToken MTR_DEPRECATED("The updateToken field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull softwareVersion MTR_DEPRECATED("The softwareVersion field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2544,18 +2256,14 @@ MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderClusterNotifyUpdateApplie @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull providerNodeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull announcementReason MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSData * _Nullable metadataForNode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull endpoint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nullable errorValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2570,26 +2278,30 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRNetworkCommissioningClusterConnectNetworkResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams : MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull announcementReason MTR_DEPRECATED("The announcementReason field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSData * _Nullable metadataForNode MTR_DEPRECATED("The metadataForNode field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull networkIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull endpoint MTR_DEPRECATED("The endpoint field will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2616,19 +2328,12 @@ MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorClusterAnnounceOTAProvid @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (Deprecated) - -@property (nonatomic, copy) NSNumber * _Nonnull providerNodeId MTR_DEPRECATED("Please use providerNodeID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_DEPRECATED("Please use vendorID", ios(16.4, 16.4), macos(13.3, 13.3), watchos(9.4, 9.4), tvos(16.4, 16.4)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterArmFailSafeParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRNetworkCommissioningClusterQueryIdentityParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull expiryLengthSeconds MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull keyIdentifier MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2655,30 +2360,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRNetworkCommissioningClusterQueryIdentityResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull identity MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRGeneralCommissioningClusterArmFailSafeResponseParams with a response-value dictionary + * Initialize an MTRNetworkCommissioningClusterQueryIdentityResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -2688,17 +2378,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject -@property (nonatomic, copy, getter=getNewRegulatoryConfig) NSNumber * _Nonnull newRegulatoryConfig MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull intent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nonnull countryCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull requestedProtocol MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable transferFileDesignator MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2726,75 +2416,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -/** - * Initialize an MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject +@property (nonatomic, copy) NSData * _Nonnull logContent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull errorCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable utcTimeStamp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSString * _Nonnull debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable timeSinceBoot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2812,7 +2442,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTRGeneralCommissioningClusterCommissioningCompleteResponseParams with a response-value dictionary + * Initialize an MTRDiagnosticLogsClusterRetrieveLogsResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -2825,12 +2455,19 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end +@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) + +@property (nonatomic, copy) NSData * _Nonnull content MTR_DEPRECATED("Please use logContent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@property (nonatomic, copy) NSNumber * _Nullable timeStamp MTR_DEPRECATED("Please use utcTimeStamp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterScanNetworksParams : NSObject +@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject -@property (nonatomic, copy) NSData * _Nullable ssid MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull enableKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull eventTrigger MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2857,16 +2494,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterScanNetworksResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSArray * _Nullable wiFiScanResults MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSArray * _Nullable threadScanResults MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRGeneralDiagnosticsClusterTimeSnapshotParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2881,10 +2510,27 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRNetworkCommissioningClusterScanNetworksResponseParams with a response-value dictionary + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull systemTimeMs MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable posixTimeMs MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -2894,23 +2540,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull ssid MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nonnull credentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable networkIdentity MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSData * _Nullable clientIdentifier MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; +@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2938,11 +2572,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull operationalDataset MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2970,11 +2600,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterRemoveNetworkParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3002,17 +2628,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterNetworkConfigResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable networkIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable clientIdentity MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; +@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3027,28 +2643,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRNetworkCommissioningClusterNetworkConfigResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterConnectNetworkParams : NSObject +MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) +@interface MTRTimeSynchronizationClusterSetUTCTimeParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull utcTime MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull granularity MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); + +@property (nonatomic, copy) NSNumber * _Nullable timeSource MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3076,13 +2690,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject +@interface MTRTimeSynchronizationClusterSetUtcTimeParams : MTRTimeSynchronizationClusterSetUTCTimeParams -@property (nonatomic, copy) NSNumber * _Nonnull networkingStatus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull utcTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull granularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable errorValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable timeSource MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3097,30 +2711,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRNetworkCommissioningClusterConnectNetworkResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRNetworkCommissioningClusterReorderNetworkParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull networkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull networkIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimeSynchronizationClusterSetTrustedTimeSourceParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable breadcrumb MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct * _Nullable trustedTimeSource MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3148,11 +2754,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRNetworkCommissioningClusterQueryIdentityParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull keyIdentifier MTR_PROVISIONALLY_AVAILABLE; +@interface MTRTimeSynchronizationClusterSetTimeZoneParams : NSObject -@property (nonatomic, copy) NSData * _Nullable possessionNonce MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull timeZone MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3180,14 +2784,12 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRNetworkCommissioningClusterQueryIdentityResponseParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull identity MTR_PROVISIONALLY_AVAILABLE; +@interface MTRTimeSynchronizationClusterSetTimeZoneResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull dstOffsetRequired MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRNetworkCommissioningClusterQueryIdentityResponseParams with a response-value dictionary + * Initialize an MTRTimeSynchronizationClusterSetTimeZoneResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -3200,14 +2802,10 @@ MTR_PROVISIONALLY_AVAILABLE error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDiagnosticLogsClusterRetrieveLogsRequestParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull intent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull requestedProtocol MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimeSynchronizationClusterSetDSTOffsetParams : NSObject -@property (nonatomic, copy) NSString * _Nullable transferFileDesignator MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +@property (nonatomic, copy) NSArray * _Nonnull dstOffset MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3234,16 +2832,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nonnull logContent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nullable utcTimeStamp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimeSynchronizationClusterSetDefaultNTPParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable timeSinceBoot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable defaultNTP MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3258,35 +2850,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRDiagnosticLogsClusterRetrieveLogsResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull content MTR_DEPRECATED("Please use logContent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable timeStamp MTR_DEPRECATED("Please use utcTimeStamp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +@property (nonatomic, copy) NSData * _Nonnull pakePasscodeVerifier MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull discriminator MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSData * _Nonnull enableKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull iterations MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull eventTrigger MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull salt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3313,8 +2900,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRGeneralDiagnosticsClusterTimeSnapshotParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) + +@property (nonatomic, copy) NSData * _Nonnull pakeVerifier MTR_DEPRECATED("Please use pakePasscodeVerifier", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3341,29 +2935,38 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull systemTimeMs MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable posixTimeMs MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRSoftwareDiagnosticsClusterResetWatermarksParams : NSObject +@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull attestationNonce MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3391,7 +2994,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThreadNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull attestationElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3406,20 +3013,31 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTROperationalCredentialsClusterAttestationResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@end + +@interface MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) + +@property (nonatomic, copy) NSData * _Nonnull signature MTR_DEPRECATED("Please use attestationSignature", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRWiFiNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull certificateType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3447,7 +3065,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTREthernetNetworkDiagnosticsClusterResetCountsParams : NSObject +@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull certificate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3462,26 +3082,28 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTROperationalCredentialsClusterCertificateChainResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) -@interface MTRTimeSynchronizationClusterSetUTCTimeParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull utcTime MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull granularity MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +@property (nonatomic, copy) NSData * _Nonnull csrNonce MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable timeSource MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +@property (nonatomic, copy) NSNumber * _Nullable isForUpdateNOC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3509,13 +3131,11 @@ MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRTimeSynchronizationClusterSetUtcTimeParams : MTRTimeSynchronizationClusterSetUTCTimeParams - -@property (nonatomic, copy) NSNumber * _Nonnull utcTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull granularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull nocsrElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable timeSource MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3530,22 +3150,34 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTROperationalCredentialsClusterCSRResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetTrustedTimeSourceParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterAddNOCParams : NSObject -@property (nonatomic, copy) MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct * _Nullable trustedTimeSource MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable icacValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nonnull ipkValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull caseAdminSubject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSNumber * _Nonnull adminVendorId MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3572,10 +3204,12 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetTimeZoneParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject -@property (nonatomic, copy) NSArray * _Nonnull timeZone MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSData * _Nullable icacValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3602,13 +3236,32 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetTimeZoneResponseParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull dstOffsetRequired MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull statusCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** - * Initialize an MTRTimeSynchronizationClusterSetTimeZoneResponseParams with a response-value dictionary + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTROperationalCredentialsClusterNOCResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -3618,13 +3271,13 @@ MTR_PROVISIONALLY_AVAILABLE * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetDSTOffsetParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject -@property (nonatomic, copy) NSArray * _Nonnull dstOffset MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3651,10 +3304,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetDefaultNTPParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject -@property (nonatomic, copy) NSString * _Nullable defaultNTP MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3682,17 +3335,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nonnull pakePasscodeVerifier MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@property (nonatomic, copy) NSNumber * _Nonnull discriminator MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull iterations MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull salt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull rootCACertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3719,15 +3364,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) -@property (nonatomic, copy) NSData * _Nonnull pakeVerifier MTR_DEPRECATED("Please use pakePasscodeVerifier", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSData * _Nonnull rootCertificate MTR_DEPRECATED("Please use rootCACertificate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull commissioningTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3755,7 +3400,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3783,9 +3430,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterAttestationRequestParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationNonce MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3800,24 +3447,26 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRGroupKeyManagementClusterKeySetReadResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterAttestationResponseParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull attestationElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3832,31 +3481,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTROperationalCredentialsClusterAttestationResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -@interface MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) - -@property (nonatomic, copy) NSData * _Nonnull signature MTR_DEPRECATED("Please use attestationSignature", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull certificateType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3884,9 +3522,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterCertificateChainResponseParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull certificate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3904,7 +3542,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); /** - * Initialize an MTROperationalCredentialsClusterCertificateChainResponseParams with a response-value dictionary + * Initialize an MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -3917,12 +3555,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterCSRRequestParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterRegisterClientParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull csrNonce MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable isForUpdateNOC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nonnull key MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3949,30 +3591,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterCSRResponseParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull nocsrElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterRegisterClientResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTROperationalCredentialsClusterCSRResponseParams with a response-value dictionary + * Initialize an MTRICDManagementClusterRegisterClientResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -3982,21 +3607,15 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterAddNOCParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable icacValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nonnull ipkValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterUnregisterClientParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull caseAdminSubject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull adminVendorId MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4023,12 +3642,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterUpdateNOCParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSData * _Nullable icacValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterStayActiveRequestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4055,32 +3670,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull statusCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nullable fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterStayActiveResponseParams : NSObject -@property (nonatomic, copy) NSString * _Nullable debugText MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTROperationalCredentialsClusterNOCResponseParams with a response-value dictionary + * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -4090,13 +3686,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterSetTimerParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull label MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy, getter=getNewTime) NSNumber * _Nonnull newTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4123,10 +3719,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterRemoveFabricParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterResetTimerParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4153,10 +3747,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterAddTimeParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull rootCACertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@property (nonatomic, copy) NSNumber * _Nonnull additionalTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4183,15 +3777,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) - -@property (nonatomic, copy) NSData * _Nonnull rootCertificate MTR_DEPRECATED("Please use rootCACertificate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimerClusterReduceTimeParams : NSObject -@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull timeReduction MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4218,10 +3807,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4248,10 +3835,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject - -@property (nonatomic, copy) MTRGroupKeyManagementClusterGroupKeySetStruct * _Nonnull groupKeySet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4266,26 +3851,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * request) within the timeout window. * */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRGroupKeyManagementClusterKeySetReadResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. + * Controls how much time, in seconds, we will allow for the server to process the command. * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull groupKeySetID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4312,8 +3891,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4340,28 +3919,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) NSArray * _Nonnull groupKeySetIDs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams with a response-value dictionary + * Initialize an MTROvenCavityOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -4371,19 +3935,13 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRICDManagementClusterRegisterClientParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nonnull monitoredSubject MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSData * _Nonnull key MTR_PROVISIONALLY_AVAILABLE; +@interface MTROvenModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4411,12 +3969,14 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRICDManagementClusterRegisterClientResponseParams : NSObject +@interface MTROvenModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRICDManagementClusterRegisterClientResponseParams with a response-value dictionary + * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -4429,12 +3989,10 @@ MTR_PROVISIONALLY_AVAILABLE error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRICDManagementClusterUnregisterClientParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTRModeSelectClusterChangeToModeParams : NSObject -@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4462,7 +4020,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRICDManagementClusterStayActiveRequestParams : NSObject +@interface MTRLaundryWasherModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4490,12 +4050,14 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRICDManagementClusterStayActiveResponseParams : NSObject +@interface MTRLaundryWasherModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary + * Initialize an MTRLaundryWasherModeClusterChangeToModeResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -4509,9 +4071,60 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterSetTimerParams : NSObject +@interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy, getter=getNewTime) NSNumber * _Nonnull newTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCRunModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4535,11 +4148,34 @@ MTR_PROVISIONALLY_AVAILABLE * * If nil, the framework will try to select an appropriate timeout value itself. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCRunModeClusterChangeToModeResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + +/** + * Initialize an MTRRVCRunModeClusterChangeToModeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterResetTimerParams : NSObject +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCCleanModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4566,10 +4202,33 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCCleanModeClusterChangeToModeResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + +/** + * Initialize an MTRRVCCleanModeClusterChangeToModeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@end + MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterAddTimeParams : NSObject +@interface MTRTemperatureControlClusterSetTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull additionalTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4597,9 +4256,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterReduceTimeParams : NSObject +@interface MTRDishwasherModeClusterChangeToModeParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeReduction MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4627,35 +4286,28 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterPauseParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@interface MTRDishwasherModeClusterChangeToModeResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRDishwasherModeClusterChangeToModeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterStopParams : NSObject +@interface MTRSmokeCOAlarmClusterSelfTestRequestParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4683,7 +4335,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterStartParams : NSObject +@interface MTRDishwasherAlarmClusterResetParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4711,7 +4365,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterResumeParams : NSObject +@interface MTRDishwasherAlarmClusterModifyEnabledAlarmsParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4739,28 +4395,13 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject - -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@interface MTRMicrowaveOvenControlClusterSetCookingParametersParams : NSObject -/** - * Initialize an MTROvenCavityOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end +@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_PROVISIONALLY_AVAILABLE; -MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenModeClusterChangeToModeParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4788,30 +4429,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRModeSelectClusterChangeToModeParams : NSObject +@interface MTRMicrowaveOvenControlClusterAddMoreTimeParams : NSObject -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4838,10 +4458,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRLaundryWasherModeClusterChangeToModeParams : NSObject - -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTROperationalStateClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4868,31 +4486,8 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRLaundryWasherModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTRLaundryWasherModeClusterChangeToModeResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams : NSObject - -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTROperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4919,31 +4514,8 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCRunModeClusterChangeToModeParams : NSObject - -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@interface MTROperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4971,30 +4543,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCRunModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -/** - * Initialize an MTRRVCRunModeClusterChangeToModeResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -@end - -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCCleanModeClusterChangeToModeParams : NSObject - -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@interface MTROperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5022,14 +4571,12 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @end MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCCleanModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@interface MTROperationalStateClusterOperationalCommandResponseParams : NSObject -@property (nonatomic, copy) NSString * _Nullable statusText MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); /** - * Initialize an MTRRVCCleanModeClusterChangeToModeResponseParams with a response-value dictionary + * Initialize an MTROperationalStateClusterOperationalCommandResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -5042,12 +4589,8 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTemperatureControlClusterSetTemperatureParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nullable targetTemperature MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable targetTemperatureLevel MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCOperationalStateClusterPauseParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5075,9 +4618,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRDishwasherModeClusterChangeToModeParams : NSObject - -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@interface MTRRVCOperationalStateClusterStopParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5097,36 +4638,15 @@ MTR_PROVISIONALLY_AVAILABLE /** * Controls how much time, in seconds, we will allow for the server to process the command. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRDishwasherModeClusterChangeToModeResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTRDishwasherModeClusterChangeToModeResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterSelfTestRequestParams : NSObject +@interface MTRRVCOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5153,10 +4673,8 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRDishwasherAlarmClusterResetParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull alarms MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCOperationalStateClusterResumeParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5183,10 +4701,37 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCOperationalStateClusterOperationalCommandResponseParams : NSObject + +@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + +/** + * Initialize an MTRRVCOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@end + MTR_PROVISIONALLY_AVAILABLE -@interface MTRDishwasherAlarmClusterModifyEnabledAlarmsParams : NSObject +@interface MTRScenesManagementClusterAddSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull mask MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull sceneName MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5214,13 +4759,34 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRMicrowaveOvenControlClusterSetCookingParametersParams : NSObject +@interface MTRScenesManagementClusterAddSceneResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable cookTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterAddSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterViewSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5248,9 +4814,40 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRMicrowaveOvenControlClusterAddMoreTimeParams : NSObject +@interface MTRScenesManagementClusterViewSceneResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeToAdd MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable sceneName MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterViewSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterRemoveSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5277,8 +4874,33 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTROperationalStateClusterPauseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterRemoveSceneResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterRemoveSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterRemoveAllScenesParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5305,8 +4927,33 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTROperationalStateClusterStopParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterRemoveAllScenesResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterRemoveAllScenesResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterStoreSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5333,8 +4980,37 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTROperationalStateClusterStartParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterStoreSceneResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterStoreSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterRecallSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5361,8 +5037,10 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTROperationalStateClusterResumeParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterGetSceneMembershipParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5389,13 +5067,19 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTROperationalStateClusterOperationalCommandResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterGetSceneMembershipResponseParams : NSObject -@property (nonatomic, copy) MTROperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable capacity MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nullable sceneList MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTROperationalStateClusterOperationalCommandResponseParams with a response-value dictionary + * Initialize an MTRScenesManagementClusterGetSceneMembershipResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -5405,11 +5089,21 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCOperationalStateClusterPauseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterEnhancedAddSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull sceneName MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nonnull extensionFieldSets MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5437,35 +5131,34 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStopParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; +@interface MTRScenesManagementClusterEnhancedAddSceneResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; /** - * Controls how much time, in seconds, we will allow for the server to process the command. + * Initialize an MTRScenesManagementClusterEnhancedAddSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. * - * If nil, the framework will try to select an appropriate timeout value itself. + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStartParams : NSObject +@interface MTRScenesManagementClusterEnhancedViewSceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5492,8 +5185,47 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCOperationalStateClusterResumeParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterEnhancedViewSceneResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable transitionTime MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable sceneName MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nullable extensionFieldSets MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRScenesManagementClusterEnhancedViewSceneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterCopySceneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull mode MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierTo MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierTo MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5520,13 +5252,17 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) -@interface MTRRVCOperationalStateClusterOperationalCommandResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterCopySceneResponseParams : NSObject -@property (nonatomic, copy) MTRRVCOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRRVCOperationalStateClusterOperationalCommandResponseParams with a response-value dictionary + * Initialize an MTRScenesManagementClusterCopySceneResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -5536,7 +5272,7 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * schema for this command. */ - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 5869394d11ffa6..40de36e3c89929 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -1158,20 +1158,10 @@ - (NSNumber * _Nonnull)groupId return self.groupID; } @end -@implementation MTRScenesClusterAddSceneParams +@implementation MTROnOffClusterOffParams - (instancetype)init { if (self = [super init]) { - - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = @(0); - - _sceneName = @""; - - _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1180,13 +1170,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterAddSceneParams alloc] init]; + auto other = [[MTROnOffClusterOffParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.transitionTime = self.transitionTime; - other.sceneName = self.sceneName; - other.extensionFieldSets = self.extensionFieldSets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1195,77 +1180,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRScenesClusterAddSceneParams (InternalMethods) +@implementation MTROnOffClusterOffParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::AddScene::Type encodableStruct; + chip::app::Clusters::OnOff::Commands::Off::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.groupID = self.groupID.unsignedShortValue; - } - { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.sceneName = AsCharSpan(self.sceneName); - } - { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(self.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.extensionFieldSets.count; ++i_0) { - if (![self.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) self.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - encodableStruct.extensionFieldSets = ListType_0(listHolder_0->mList, self.extensionFieldSets.count); - } else { - encodableStruct.extensionFieldSets = ListType_0(); - } - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -1305,151 +1231,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterAddSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterAddSceneResponseParams +@implementation MTROnOffClusterOnParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; + auto other = [[MTROnOffClusterOnParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterAddSceneResponseParams (InternalMethods) +@implementation MTROnOffClusterOnParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; - } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + chip::app::Clusters::OnOff::Commands::On::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - return CHIP_NO_ERROR; -} -@end + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRScenesClusterAddSceneResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (void)setSceneId:(NSNumber * _Nonnull)sceneId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - self.sceneID = sceneId; -} + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRScenesClusterViewSceneParams + +@implementation MTROnOffClusterToggleParams - (instancetype)init { if (self = [super init]) { - - _groupID = @(0); - - _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1458,10 +1316,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterViewSceneParams alloc] init]; + auto other = [[MTROnOffClusterToggleParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1470,24 +1326,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRScenesClusterViewSceneParams (InternalMethods) +@implementation MTROnOffClusterToggleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::ViewScene::Type encodableStruct; + chip::app::Clusters::OnOff::Commands::Toggle::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.groupID = self.groupID.unsignedShortValue; - } - { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -1527,217 +1377,107 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterViewSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterViewSceneResponseParams +@implementation MTROnOffClusterOffWithEffectParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = nil; - - _sceneName = nil; + _effectIdentifier = @(0); - _extensionFieldSets = nil; + _effectVariant = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; + auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.transitionTime = self.transitionTime; - other.sceneName = self.sceneName; - other.extensionFieldSets = self.extensionFieldSets; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.effectIdentifier = self.effectIdentifier; + other.effectVariant = self.effectVariant; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: effectIdentifier:%@; effectVariant:%@; >", NSStringFromClass([self class]), _effectIdentifier, _effectVariant]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROnOffClusterOffWithEffectParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.effectIdentifier = static_cast>(self.effectIdentifier.unsignedCharValue); + } + { + encodableStruct.effectVariant = self.effectVariant.unsignedCharValue; } - using DecodableType = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRScenesClusterViewSceneResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; - } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; - } - { - if (decodableStruct.transitionTime.HasValue()) { - self.transitionTime = [NSNumber numberWithUnsignedShort:decodableStruct.transitionTime.Value()]; - } else { - self.transitionTime = nil; - } - } - { - if (decodableStruct.sceneName.HasValue()) { - self.sceneName = AsString(decodableStruct.sceneName.Value()); - if (self.sceneName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.sceneName = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.extensionFieldSets.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.extensionFieldSets.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRScenesClusterExtensionFieldSet * newElement_1; - newElement_1 = [MTRScenesClusterExtensionFieldSet new]; - newElement_1.clusterID = [NSNumber numberWithUnsignedInt:entry_1.clusterID]; - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_1.attributeValueList.begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - MTRScenesClusterAttributeValuePair * newElement_3; - newElement_3 = [MTRScenesClusterAttributeValuePair new]; - newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID]; - newElement_3.attributeValue = [NSNumber numberWithUnsignedInt:entry_3.attributeValue]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - newElement_1.attributeValueList = array_3; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.extensionFieldSets = array_1; - } - } else { - self.extensionFieldSets = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRScenesClusterViewSceneResponseParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} +@implementation MTROnOffClusterOffWithEffectParams (Deprecated) -- (void)setSceneId:(NSNumber * _Nonnull)sceneId +- (void)setEffectId:(NSNumber * _Nonnull)effectId { - self.sceneID = sceneId; + self.effectIdentifier = effectId; } -- (NSNumber * _Nonnull)sceneId +- (NSNumber * _Nonnull)effectId { - return self.sceneID; + return self.effectIdentifier; } @end -@implementation MTRScenesClusterRemoveSceneParams +@implementation MTROnOffClusterOnWithRecallGlobalSceneParams - (instancetype)init { if (self = [super init]) { - - _groupID = @(0); - - _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1746,10 +1486,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; + auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1758,24 +1496,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRScenesClusterRemoveSceneParams (InternalMethods) +@implementation MTROnOffClusterOnWithRecallGlobalSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::RemoveScene::Type encodableStruct; + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.groupID = self.groupID.unsignedShortValue; - } - { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -1815,149 +1547,109 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterRemoveSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterRemoveSceneResponseParams +@implementation MTROnOffClusterOnWithTimedOffParams - (instancetype)init { if (self = [super init]) { - _status = @(0); + _onOffControl = @(0); - _groupID = @(0); + _onTime = @(0); - _sceneID = @(0); + _offWaitTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; + auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.onOffControl = self.onOffControl; + other.onTime = self.onTime; + other.offWaitTime = self.offWaitTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: onOffControl:%@; onTime:%@; offWaitTime:%@; >", NSStringFromClass([self class]), _onOffControl, _onTime, _offWaitTime]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterRemoveSceneResponseParams (InternalMethods) +@implementation MTROnOffClusterOnWithTimedOffParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + encodableStruct.onOffControl = static_cast>(self.onOffControl.unsignedCharValue); } { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + encodableStruct.onTime = self.onTime.unsignedShortValue; } { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + encodableStruct.offWaitTime = self.offWaitTime.unsignedShortValue; } - return CHIP_NO_ERROR; -} -@end - -@implementation MTRScenesClusterRemoveSceneResponseParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (NSNumber * _Nonnull)sceneId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - return self.sceneID; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRScenesClusterRemoveAllScenesParams + +@implementation MTRLevelControlClusterMoveToLevelParams - (instancetype)init { if (self = [super init]) { - _groupID = @(0); + _level = @(0); + + _transitionTime = nil; + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1966,9 +1658,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - other.groupID = self.groupID; + other.level = self.level; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1977,20 +1672,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @end -@implementation MTRScenesClusterRemoveAllScenesParams (InternalMethods) +@implementation MTRLevelControlClusterMoveToLevelParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.level = self.level.unsignedCharValue; + } + { + if (self.transitionTime == nil) { + encodableStruct.transitionTime.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); + nonNullValue_0 = self.transitionTime.unsignedShortValue; + } + } + { + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + } + { + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -2031,125 +1740,122 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterRemoveAllScenesParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} -@end -@implementation MTRScenesClusterRemoveAllScenesResponseParams +@implementation MTRLevelControlClusterMoveParams - (instancetype)init { if (self = [super init]) { - _status = @(0); + _moveMode = @(0); - _groupID = @(0); + _rate = nil; + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterRemoveAllScenesResponseParams (InternalMethods) +@implementation MTRLevelControlClusterMoveParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::LevelControl::Commands::Move::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); } { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + if (self.rate == nil) { + encodableStruct.rate.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.rate.SetNonNull(); + nonNullValue_0 = self.rate.unsignedCharValue; + } + } + { + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + } + { + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } - return CHIP_NO_ERROR; -} -@end + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } -@implementation MTRScenesClusterRemoveAllScenesResponseParams (Deprecated) + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (NSNumber * _Nonnull)groupId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - return self.groupID; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRScenesClusterStoreSceneParams + +@implementation MTRLevelControlClusterStepParams - (instancetype)init { if (self = [super init]) { - _groupID = @(0); + _stepMode = @(0); - _sceneID = @(0); + _stepSize = @(0); + + _transitionTime = nil; + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -2158,10 +1864,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; + auto other = [[MTRLevelControlClusterStepParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -2170,23 +1879,37 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @end -@implementation MTRScenesClusterStoreSceneParams (InternalMethods) +@implementation MTRLevelControlClusterStepParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::StoreScene::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::Step::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); } { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; + encodableStruct.stepSize = self.stepSize.unsignedCharValue; + } + { + if (self.transitionTime == nil) { + encodableStruct.transitionTime.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); + nonNullValue_0 = self.transitionTime.unsignedShortValue; + } + } + { + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + } + { + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -2227,153 +1950,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterStoreSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId +@implementation MTRLevelControlClusterStopParams +- (instancetype)init { - self.groupID = groupId; -} + if (self = [super init]) { -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} + _optionsMask = @(0); -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterStoreSceneResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; + auto other = [[MTRLevelControlClusterStopParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterStoreSceneResponseParams (InternalMethods) +@implementation MTRLevelControlClusterStopParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::LevelControl::Commands::Stop::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - return CHIP_NO_ERROR; -} -@end + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRScenesClusterStoreSceneResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (void)setSceneId:(NSNumber * _Nonnull)sceneId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - self.sceneID = sceneId; -} + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRScenesClusterRecallSceneParams + +@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams - (instancetype)init { if (self = [super init]) { - _groupID = @(0); - - _sceneID = @(0); + _level = @(0); _transitionTime = nil; + + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -2382,11 +2055,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.level = self.level; other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -2395,34 +2069,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } @end -@implementation MTRScenesClusterRecallSceneParams (InternalMethods) +@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::RecallScene::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.level = self.level.unsignedCharValue; } { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; + if (self.transitionTime == nil) { + encodableStruct.transitionTime.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); + nonNullValue_0 = self.transitionTime.unsignedShortValue; + } } { - if (self.transitionTime != nil) { - auto & definedValue_0 = encodableStruct.transitionTime.Emplace(); - if (self.transitionTime == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.transitionTime.unsignedShortValue; - } - } + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + } + { + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -2463,34 +2137,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterRecallSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId +@implementation MTRLevelControlClusterMoveWithOnOffParams +- (instancetype)init { - self.groupID = groupId; -} + if (self = [super init]) { -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} + _moveMode = @(0); -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} + _rate = nil; -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterGetSceneMembershipParams -- (instancetype)init -{ - if (self = [super init]) { + _optionsMask = @(0); - _groupID = @(0); + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -2499,9 +2157,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; - other.groupID = self.groupID; + other.moveMode = self.moveMode; + other.rate = self.rate; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -2510,20 +2171,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; return descriptionString; } @end -@implementation MTRScenesClusterGetSceneMembershipParams (InternalMethods) +@implementation MTRLevelControlClusterMoveWithOnOffParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + } + { + if (self.rate == nil) { + encodableStruct.rate.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.rate.SetNonNull(); + nonNullValue_0 = self.rate.unsignedCharValue; + } + } + { + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + } + { + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -2564,480 +2239,74 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterGetSceneMembershipParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} -@end -@implementation MTRScenesClusterGetSceneMembershipResponseParams +@implementation MTRLevelControlClusterStepWithOnOffParams - (instancetype)init { if (self = [super init]) { - _status = @(0); + _stepMode = @(0); - _capacity = nil; + _stepSize = @(0); - _groupID = @(0); + _transitionTime = nil; - _sceneList = nil; + _optionsMask = @(0); + + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterGetSceneMembershipResponseParams alloc] init]; + auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; - other.status = self.status; - other.capacity = self.capacity; - other.groupID = self.groupID; - other.sceneList = self.sceneList; + other.stepMode = self.stepMode; + other.stepSize = self.stepSize; + other.transitionTime = self.transitionTime; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupID:%@; sceneList:%@; >", NSStringFromClass([self class]), _status, _capacity, _groupID, _sceneList]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } +@end - using DecodableType = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } +@implementation MTRLevelControlClusterStepWithOnOffParams (InternalMethods) - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRScenesClusterGetSceneMembershipResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType &)decodableStruct -{ - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - if (decodableStruct.capacity.IsNull()) { - self.capacity = nil; - } else { - self.capacity = [NSNumber numberWithUnsignedChar:decodableStruct.capacity.Value()]; - } - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; - } - { - if (decodableStruct.sceneList.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.sceneList.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - NSNumber * newElement_1; - newElement_1 = [NSNumber numberWithUnsignedChar:entry_1]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.sceneList = array_1; - } - } else { - self.sceneList = nil; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} -@end -@implementation MTRScenesClusterEnhancedAddSceneParams -- (instancetype)init -{ - if (self = [super init]) { - - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = @(0); - - _sceneName = @""; - - _extensionFieldSets = [NSArray array]; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; - - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.transitionTime = self.transitionTime; - other.sceneName = self.sceneName; - other.extensionFieldSets = self.extensionFieldSets; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; - return descriptionString; -} - -@end - -@implementation MTRScenesClusterEnhancedAddSceneParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.groupID = self.groupID.unsignedShortValue; - } - { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.sceneName = AsCharSpan(self.sceneName); - } - { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(self.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.extensionFieldSets.count; ++i_0) { - if (![self.extensionFieldSets[i_0] isKindOfClass:[MTRScenesClusterExtensionFieldSet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRScenesClusterExtensionFieldSet *) self.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.attributeValueList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { - if (![element_0.attributeValueList[i_2] isKindOfClass:[MTRScenesClusterAttributeValuePair class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; - listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; - } - listHolder_0->mList[i_0].attributeValueList = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); - } else { - listHolder_0->mList[i_0].attributeValueList = ListType_2(); - } - } - } - encodableStruct.extensionFieldSets = ListType_0(listHolder_0->mList, self.extensionFieldSets.count); - } else { - encodableStruct.extensionFieldSets = ListType_0(); - } - } - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRScenesClusterEnhancedAddSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterEnhancedAddSceneResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; - - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRScenesClusterEnhancedAddSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); } { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + encodableStruct.stepSize = self.stepSize.unsignedCharValue; } { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRScenesClusterEnhancedAddSceneResponseParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterEnhancedViewSceneParams -- (instancetype)init -{ - if (self = [super init]) { - - _groupID = @(0); - - _sceneID = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + if (self.transitionTime == nil) { + encodableStruct.transitionTime.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); + nonNullValue_0 = self.transitionTime.unsignedShortValue; + } } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; - - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; - return descriptionString; -} - -@end - -@implementation MTRScenesClusterEnhancedViewSceneParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -3078,223 +2347,97 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterEnhancedViewSceneParams (Deprecated) - -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} - -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; -} - -- (void)setSceneId:(NSNumber * _Nonnull)sceneId -{ - self.sceneID = sceneId; -} - -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; -} -@end -@implementation MTRScenesClusterEnhancedViewSceneResponseParams +@implementation MTRLevelControlClusterStopWithOnOffParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = nil; - - _sceneName = nil; + _optionsMask = @(0); - _extensionFieldSets = nil; + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; + auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; - other.transitionTime = self.transitionTime; - other.sceneName = self.sceneName; - other.extensionFieldSets = self.extensionFieldSets; + other.optionsMask = self.optionsMask; + other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterEnhancedViewSceneResponseParams (InternalMethods) +@implementation MTRLevelControlClusterStopWithOnOffParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; - } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; - } - { - if (decodableStruct.transitionTime.HasValue()) { - self.transitionTime = [NSNumber numberWithUnsignedShort:decodableStruct.transitionTime.Value()]; - } else { - self.transitionTime = nil; - } + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - if (decodableStruct.sceneName.HasValue()) { - self.sceneName = AsString(decodableStruct.sceneName.Value()); - if (self.sceneName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.sceneName = nil; - } + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } - { - if (decodableStruct.extensionFieldSets.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.extensionFieldSets.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRScenesClusterExtensionFieldSet * newElement_1; - newElement_1 = [MTRScenesClusterExtensionFieldSet new]; - newElement_1.clusterID = [NSNumber numberWithUnsignedInt:entry_1.clusterID]; - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_1.attributeValueList.begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - MTRScenesClusterAttributeValuePair * newElement_3; - newElement_3 = [MTRScenesClusterAttributeValuePair new]; - newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID]; - newElement_3.attributeValue = [NSNumber numberWithUnsignedInt:entry_3.attributeValue]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - newElement_1.attributeValueList = array_3; - } - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.extensionFieldSets = array_1; - } - } else { - self.extensionFieldSets = nil; - } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - return CHIP_NO_ERROR; -} -@end + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRScenesClusterEnhancedViewSceneResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; -} + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (NSNumber * _Nonnull)groupId -{ - return self.groupID; + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (void)setSceneId:(NSNumber * _Nonnull)sceneId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - self.sceneID = sceneId; -} + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } -- (NSNumber * _Nonnull)sceneId -{ - return self.sceneID; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTRScenesClusterCopySceneParams + +@implementation MTRLevelControlClusterMoveToClosestFrequencyParams - (instancetype)init { if (self = [super init]) { - _mode = @(0); - - _groupIdentifierFrom = @(0); - - _sceneIdentifierFrom = @(0); - - _groupIdentifierTo = @(0); - - _sceneIdentifierTo = @(0); + _frequency = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3303,13 +2446,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterCopySceneParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; - other.mode = self.mode; - other.groupIdentifierFrom = self.groupIdentifierFrom; - other.sceneIdentifierFrom = self.sceneIdentifierFrom; - other.groupIdentifierTo = self.groupIdentifierTo; - other.sceneIdentifierTo = self.sceneIdentifierTo; + other.frequency = self.frequency; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3318,32 +2457,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; groupIdentifierTo:%@; sceneIdentifierTo:%@; >", NSStringFromClass([self class]), _mode, _groupIdentifierFrom, _sceneIdentifierFrom, _groupIdentifierTo, _sceneIdentifierTo]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; return descriptionString; } @end -@implementation MTRScenesClusterCopySceneParams (InternalMethods) +@implementation MTRLevelControlClusterMoveToClosestFrequencyParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::CopyScene::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type encodableStruct; ListFreer listFreer; { - encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); - } - { - encodableStruct.groupIdentifierFrom = self.groupIdentifierFrom.unsignedShortValue; - } - { - encodableStruct.sceneIdentifierFrom = self.sceneIdentifierFrom.unsignedCharValue; - } - { - encodableStruct.groupIdentifierTo = self.groupIdentifierTo.unsignedShortValue; - } - { - encodableStruct.sceneIdentifierTo = self.sceneIdentifierTo.unsignedCharValue; + encodableStruct.frequency = self.frequency.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -3384,167 +2511,104 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRScenesClusterCopySceneParams (Deprecated) - -- (void)setGroupIdFrom:(NSNumber * _Nonnull)groupIdFrom -{ - self.groupIdentifierFrom = groupIdFrom; -} - -- (NSNumber * _Nonnull)groupIdFrom -{ - return self.groupIdentifierFrom; -} - -- (void)setSceneIdFrom:(NSNumber * _Nonnull)sceneIdFrom -{ - self.sceneIdentifierFrom = sceneIdFrom; -} - -- (NSNumber * _Nonnull)sceneIdFrom -{ - return self.sceneIdentifierFrom; -} - -- (void)setGroupIdTo:(NSNumber * _Nonnull)groupIdTo -{ - self.groupIdentifierTo = groupIdTo; -} - -- (NSNumber * _Nonnull)groupIdTo -{ - return self.groupIdentifierTo; -} - -- (void)setSceneIdTo:(NSNumber * _Nonnull)sceneIdTo -{ - self.sceneIdentifierTo = sceneIdTo; -} - -- (NSNumber * _Nonnull)sceneIdTo -{ - return self.sceneIdentifierTo; -} -@end -@implementation MTRScenesClusterCopySceneResponseParams +@implementation MTRActionsClusterInstantActionParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _groupIdentifierFrom = @(0); + _actionID = @(0); - _sceneIdentifierFrom = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; + auto other = [[MTRActionsClusterInstantActionParams alloc] init]; - other.status = self.status; - other.groupIdentifierFrom = self.groupIdentifierFrom; - other.sceneIdentifierFrom = self.sceneIdentifierFrom; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; >", NSStringFromClass([self class]), _status, _groupIdentifierFrom, _sceneIdentifierFrom]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - @end -@implementation MTRScenesClusterCopySceneResponseParams (InternalMethods) +@implementation MTRActionsClusterInstantActionParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::Actions::Commands::InstantAction::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - self.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:decodableStruct.groupIdentifierFrom]; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } } - { - self.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:decodableStruct.sceneIdentifierFrom]; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - return CHIP_NO_ERROR; -} -@end + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRScenesClusterCopySceneResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setGroupIdFrom:(NSNumber * _Nonnull)groupIdFrom -{ - self.groupIdentifierFrom = groupIdFrom; -} + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (NSNumber * _Nonnull)groupIdFrom -{ - return self.groupIdentifierFrom; + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (void)setSceneIdFrom:(NSNumber * _Nonnull)sceneIdFrom +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - self.sceneIdentifierFrom = sceneIdFrom; -} + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } -- (NSNumber * _Nonnull)sceneIdFrom -{ - return self.sceneIdentifierFrom; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTROnOffClusterOffParams + +@implementation MTRActionsClusterInstantActionWithTransitionParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + + _transitionTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3553,8 +2617,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOffParams alloc] init]; + auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3563,18 +2630,30 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _transitionTime]; return descriptionString; } @end -@implementation MTROnOffClusterOffParams (InternalMethods) +@implementation MTRActionsClusterInstantActionWithTransitionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::Off::Type encodableStruct; + chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.actionID = self.actionID.unsignedShortValue; + } + { + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -3614,10 +2693,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOnParams +@implementation MTRActionsClusterStartActionParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3626,8 +2709,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnParams alloc] init]; + auto other = [[MTRActionsClusterStartActionParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3636,18 +2721,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTROnOffClusterOnParams (InternalMethods) +@implementation MTRActionsClusterStartActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::On::Type encodableStruct; + chip::app::Clusters::Actions::Commands::StartAction::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.actionID = self.actionID.unsignedShortValue; + } + { + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -3687,10 +2781,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterToggleParams +@implementation MTRActionsClusterStartActionWithDurationParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3699,8 +2799,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterToggleParams alloc] init]; + auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3709,18 +2812,30 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; return descriptionString; } @end -@implementation MTROnOffClusterToggleParams (InternalMethods) +@implementation MTRActionsClusterStartActionWithDurationParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::Toggle::Type encodableStruct; + chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.actionID = self.actionID.unsignedShortValue; + } + { + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } + } + { + encodableStruct.duration = self.duration.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -3760,14 +2875,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOffWithEffectParams +@implementation MTRActionsClusterStopActionParams - (instancetype)init { if (self = [super init]) { - _effectIdentifier = @(0); + _actionID = @(0); - _effectVariant = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3776,10 +2891,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; + auto other = [[MTRActionsClusterStopActionParams alloc] init]; - other.effectIdentifier = self.effectIdentifier; - other.effectVariant = self.effectVariant; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3788,23 +2903,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: effectIdentifier:%@; effectVariant:%@; >", NSStringFromClass([self class]), _effectIdentifier, _effectVariant]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTROnOffClusterOffWithEffectParams (InternalMethods) +@implementation MTRActionsClusterStopActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type encodableStruct; + chip::app::Clusters::Actions::Commands::StopAction::Type encodableStruct; ListFreer listFreer; { - encodableStruct.effectIdentifier = static_cast>(self.effectIdentifier.unsignedCharValue); + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - encodableStruct.effectVariant = self.effectVariant.unsignedCharValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -3845,22 +2963,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOffWithEffectParams (Deprecated) - -- (void)setEffectId:(NSNumber * _Nonnull)effectId -{ - self.effectIdentifier = effectId; -} - -- (NSNumber * _Nonnull)effectId -{ - return self.effectIdentifier; -} -@end -@implementation MTROnOffClusterOnWithRecallGlobalSceneParams +@implementation MTRActionsClusterPauseActionParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3869,8 +2979,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; + auto other = [[MTRActionsClusterPauseActionParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3879,18 +2991,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTROnOffClusterOnWithRecallGlobalSceneParams (InternalMethods) +@implementation MTRActionsClusterPauseActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type encodableStruct; + chip::app::Clusters::Actions::Commands::PauseAction::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.actionID = self.actionID.unsignedShortValue; + } + { + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -3930,16 +3051,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOnWithTimedOffParams +@implementation MTRActionsClusterPauseActionWithDurationParams - (instancetype)init { if (self = [super init]) { - _onOffControl = @(0); + _actionID = @(0); - _onTime = @(0); + _invokeID = nil; - _offWaitTime = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3948,11 +3069,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; + auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; - other.onOffControl = self.onOffControl; - other.onTime = self.onTime; - other.offWaitTime = self.offWaitTime; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3961,26 +3082,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: onOffControl:%@; onTime:%@; offWaitTime:%@; >", NSStringFromClass([self class]), _onOffControl, _onTime, _offWaitTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; return descriptionString; } @end -@implementation MTROnOffClusterOnWithTimedOffParams (InternalMethods) +@implementation MTRActionsClusterPauseActionWithDurationParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type encodableStruct; + chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type encodableStruct; ListFreer listFreer; { - encodableStruct.onOffControl = static_cast>(self.onOffControl.unsignedCharValue); + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - encodableStruct.onTime = self.onTime.unsignedShortValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } } { - encodableStruct.offWaitTime = self.offWaitTime.unsignedShortValue; + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4021,18 +3145,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToLevelParams +@implementation MTRActionsClusterResumeActionParams - (instancetype)init { if (self = [super init]) { - _level = @(0); - - _transitionTime = nil; - - _optionsMask = @(0); + _actionID = @(0); - _optionsOverride = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4041,12 +3161,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + auto other = [[MTRActionsClusterResumeActionParams alloc] init]; - other.level = self.level; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4055,35 +3173,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveToLevelParams (InternalMethods) +@implementation MTRActionsClusterResumeActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type encodableStruct; + chip::app::Clusters::Actions::Commands::ResumeAction::Type encodableStruct; ListFreer listFreer; { - encodableStruct.level = self.level.unsignedCharValue; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - if (self.transitionTime == nil) { - encodableStruct.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); - nonNullValue_0 = self.transitionTime.unsignedShortValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; } } - { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); - } - { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -4123,18 +3233,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveParams +@implementation MTRActionsClusterEnableActionParams - (instancetype)init { if (self = [super init]) { - _moveMode = @(0); - - _rate = nil; - - _optionsMask = @(0); + _actionID = @(0); - _optionsOverride = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4143,12 +3249,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveParams alloc] init]; + auto other = [[MTRActionsClusterEnableActionParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4157,35 +3261,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveParams (InternalMethods) +@implementation MTRActionsClusterEnableActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::Move::Type encodableStruct; + chip::app::Clusters::Actions::Commands::EnableAction::Type encodableStruct; ListFreer listFreer; { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - if (self.rate == nil) { - encodableStruct.rate.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.rate.SetNonNull(); - nonNullValue_0 = self.rate.unsignedCharValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; } } - { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); - } - { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -4225,20 +3321,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterStepParams +@implementation MTRActionsClusterEnableActionWithDurationParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = nil; + _actionID = @(0); - _optionsMask = @(0); + _invokeID = nil; - _optionsOverride = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4247,13 +3339,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStepParams alloc] init]; + auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4262,37 +3352,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; return descriptionString; } @end -@implementation MTRLevelControlClusterStepParams (InternalMethods) +@implementation MTRActionsClusterEnableActionWithDurationParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::Step::Type encodableStruct; + chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type encodableStruct; ListFreer listFreer; { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); - } - { - encodableStruct.stepSize = self.stepSize.unsignedCharValue; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - if (self.transitionTime == nil) { - encodableStruct.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); - nonNullValue_0 = self.transitionTime.unsignedShortValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; } } { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); - } - { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4333,14 +3415,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterStopParams +@implementation MTRActionsClusterDisableActionParams - (instancetype)init { if (self = [super init]) { - _optionsMask = @(0); + _actionID = @(0); - _optionsOverride = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4349,10 +3431,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStopParams alloc] init]; + auto other = [[MTRActionsClusterDisableActionParams alloc] init]; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4361,23 +3443,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTRLevelControlClusterStopParams (InternalMethods) +@implementation MTRActionsClusterDisableActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::Stop::Type encodableStruct; + chip::app::Clusters::Actions::Commands::DisableAction::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4418,18 +3503,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams +@implementation MTRActionsClusterDisableActionWithDurationParams - (instancetype)init { if (self = [super init]) { - _level = @(0); - - _transitionTime = nil; + _actionID = @(0); - _optionsMask = @(0); + _invokeID = nil; - _optionsOverride = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4438,12 +3521,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; - other.level = self.level; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4452,34 +3534,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams (InternalMethods) +@implementation MTRActionsClusterDisableActionWithDurationParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type encodableStruct; + chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type encodableStruct; ListFreer listFreer; { - encodableStruct.level = self.level.unsignedCharValue; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - if (self.transitionTime == nil) { - encodableStruct.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); - nonNullValue_0 = self.transitionTime.unsignedShortValue; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; } } { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); - } - { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4520,18 +3597,53 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveWithOnOffParams +@implementation MTRBasicClusterMfgSpecificPingParams - (instancetype)init { if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} - _moveMode = @(0); +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; - _rate = nil; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - _optionsMask = @(0); + return other; +} - _optionsOverride = @(0); +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end +@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams +- (instancetype)init +{ + if (self = [super init]) { + + _vendorID = @(0); + + _productID = @(0); + + _softwareVersion = @(0); + + _protocolsSupported = [NSArray array]; + + _hardwareVersion = nil; + + _location = nil; + + _requestorCanConsent = nil; + + _metadataForProvider = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4540,12 +3652,16 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.vendorID = self.vendorID; + other.productID = self.productID; + other.softwareVersion = self.softwareVersion; + other.protocolsSupported = self.protocolsSupported; + other.hardwareVersion = self.hardwareVersion; + other.location = self.location; + other.requestorCanConsent = self.requestorCanConsent; + other.metadataForProvider = self.metadataForProvider; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4554,34 +3670,74 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: vendorID:%@; productID:%@; softwareVersion:%@; protocolsSupported:%@; hardwareVersion:%@; location:%@; requestorCanConsent:%@; metadataForProvider:%@; >", NSStringFromClass([self class]), _vendorID, _productID, _softwareVersion, _protocolsSupported, _hardwareVersion, _location, _requestorCanConsent, [_metadataForProvider base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveWithOnOffParams (InternalMethods) +@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type encodableStruct; ListFreer listFreer; { - encodableStruct.moveMode = static_cast>(self.moveMode.unsignedCharValue); + encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); } { - if (self.rate == nil) { - encodableStruct.rate.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.rate.SetNonNull(); - nonNullValue_0 = self.rate.unsignedCharValue; + encodableStruct.productID = self.productID.unsignedShortValue; + } + { + encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.protocolsSupported.count != 0) { + auto * listHolder_0 = new ListHolder(self.protocolsSupported.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.protocolsSupported.count; ++i_0) { + if (![self.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) self.protocolsSupported[i_0]; + listHolder_0->mList[i_0] = static_castmList[i_0])>>(element_0.unsignedCharValue); + } + encodableStruct.protocolsSupported = ListType_0(listHolder_0->mList, self.protocolsSupported.count); + } else { + encodableStruct.protocolsSupported = ListType_0(); + } } } { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + if (self.hardwareVersion != nil) { + auto & definedValue_0 = encodableStruct.hardwareVersion.Emplace(); + definedValue_0 = self.hardwareVersion.unsignedShortValue; + } } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + if (self.location != nil) { + auto & definedValue_0 = encodableStruct.location.Emplace(); + definedValue_0 = AsCharSpan(self.location); + } + } + { + if (self.requestorCanConsent != nil) { + auto & definedValue_0 = encodableStruct.requestorCanConsent.Emplace(); + definedValue_0 = self.requestorCanConsent.boolValue; + } + } + { + if (self.metadataForProvider != nil) { + auto & definedValue_0 = encodableStruct.metadataForProvider.Emplace(); + definedValue_0 = AsByteSpan(self.metadataForProvider); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4622,122 +3778,219 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterStepWithOnOffParams +@implementation MTROtaSoftwareUpdateProviderClusterQueryImageParams +@dynamic softwareVersion; +@dynamic protocolsSupported; +@dynamic hardwareVersion; +@dynamic location; +@dynamic requestorCanConsent; +@dynamic metadataForProvider; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end + +@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (Deprecated) + +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} + +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} + +- (void)setProductId:(NSNumber * _Nonnull)productId +{ + self.productID = productId; +} + +- (NSNumber * _Nonnull)productId +{ + return self.productID; +} +@end +@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); + _status = @(0); - _stepSize = @(0); + _delayedActionTime = nil; - _transitionTime = nil; + _imageURI = nil; - _optionsMask = @(0); + _softwareVersion = nil; - _optionsOverride = @(0); + _softwareVersionString = nil; + + _updateToken = nil; + + _userConsentNeeded = nil; + + _metadataForRequestor = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.status = self.status; + other.delayedActionTime = self.delayedActionTime; + other.imageURI = self.imageURI; + other.softwareVersion = self.softwareVersion; + other.softwareVersionString = self.softwareVersionString; + other.updateToken = self.updateToken; + other.userConsentNeeded = self.userConsentNeeded; + other.metadataForRequestor = self.metadataForRequestor; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - return other; -} + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; delayedActionTime:%@; imageURI:%@; softwareVersion:%@; softwareVersionString:%@; updateToken:%@; userConsentNeeded:%@; metadataForRequestor:%@; >", NSStringFromClass([self class]), _status, _delayedActionTime, _imageURI, _softwareVersion, _softwareVersionString, [_updateToken base64EncodedStringWithOptions:0], _userConsentNeeded, [_metadataForRequestor base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; - return descriptionString; + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } @end -@implementation MTRLevelControlClusterStepWithOnOffParams (InternalMethods) +@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &)decodableStruct { - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.stepMode = static_cast>(self.stepMode.unsignedCharValue); + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - encodableStruct.stepSize = self.stepSize.unsignedCharValue; + if (decodableStruct.delayedActionTime.HasValue()) { + self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime.Value()]; + } else { + self.delayedActionTime = nil; + } } { - if (self.transitionTime == nil) { - encodableStruct.transitionTime.SetNull(); + if (decodableStruct.imageURI.HasValue()) { + self.imageURI = AsString(decodableStruct.imageURI.Value()); + if (self.imageURI == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } } else { - auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); - nonNullValue_0 = self.transitionTime.unsignedShortValue; + self.imageURI = nil; } } { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + if (decodableStruct.softwareVersion.HasValue()) { + self.softwareVersion = [NSNumber numberWithUnsignedInt:decodableStruct.softwareVersion.Value()]; + } else { + self.softwareVersion = nil; + } } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + if (decodableStruct.softwareVersionString.HasValue()) { + self.softwareVersionString = AsString(decodableStruct.softwareVersionString.Value()); + if (self.softwareVersionString == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.softwareVersionString = nil; + } } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + { + if (decodableStruct.updateToken.HasValue()) { + self.updateToken = AsData(decodableStruct.updateToken.Value()); + } else { + self.updateToken = nil; + } } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + if (decodableStruct.userConsentNeeded.HasValue()) { + self.userConsentNeeded = [NSNumber numberWithBool:decodableStruct.userConsentNeeded.Value()]; + } else { + self.userConsentNeeded = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.metadataForRequestor.HasValue()) { + self.metadataForRequestor = AsData(decodableStruct.metadataForRequestor.Value()); + } else { + self.metadataForRequestor = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRLevelControlClusterStopWithOnOffParams +@implementation MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams +@dynamic status; +@dynamic delayedActionTime; +@dynamic imageURI; +@dynamic softwareVersion; +@dynamic softwareVersionString; +@dynamic updateToken; +@dynamic userConsentNeeded; +@dynamic metadataForRequestor; + +@dynamic timedInvokeTimeoutMs; +@end +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams - (instancetype)init { if (self = [super init]) { - _optionsMask = @(0); + _updateToken = [NSData data]; - _optionsOverride = @(0); + _newVersion = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4746,10 +3999,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.updateToken = self.updateToken; + other.newVersion = self.newVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4758,23 +4011,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; newVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _newVersion]; return descriptionString; } @end -@implementation MTRLevelControlClusterStopWithOnOffParams (InternalMethods) +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + encodableStruct.updateToken = AsByteSpan(self.updateToken); } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + encodableStruct.newVersion = self.newVersion.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4815,93 +4068,114 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToClosestFrequencyParams +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams +@dynamic updateToken; +@dynamic newVersion; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams - (instancetype)init { if (self = [super init]) { - _frequency = @(0); + _action = @(0); + + _delayedActionTime = @(0); _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; - other.frequency = self.frequency; + other.action = self.action; + other.delayedActionTime = self.delayedActionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; return descriptionString; } -@end - -@implementation MTRLevelControlClusterMoveToClosestFrequencyParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.frequency = self.frequency.unsignedShortValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.action)]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } + { + self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime]; } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterInstantActionParams +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams +@dynamic action; +@dynamic delayedActionTime; + +@dynamic timedInvokeTimeoutMs; +@end +@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _updateToken = [NSData data]; - _invokeID = nil; + _softwareVersion = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4910,10 +4184,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterInstantActionParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.updateToken = self.updateToken; + other.softwareVersion = self.softwareVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4922,26 +4196,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; softwareVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _softwareVersion]; return descriptionString; } @end -@implementation MTRActionsClusterInstantActionParams (InternalMethods) +@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::InstantAction::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.updateToken = AsByteSpan(self.updateToken); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4982,16 +4253,27 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterInstantActionWithTransitionParams +@implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams +@dynamic updateToken; +@dynamic softwareVersion; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _providerNodeID = @(0); - _invokeID = nil; + _vendorID = @(0); - _transitionTime = @(0); + _announcementReason = @(0); + + _metadataForNode = nil; + + _endpoint = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5000,11 +4282,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; + auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.transitionTime = self.transitionTime; + other.providerNodeID = self.providerNodeID; + other.vendorID = self.vendorID; + other.announcementReason = self.announcementReason; + other.metadataForNode = self.metadataForNode; + other.endpoint = self.endpoint; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5013,29 +4297,35 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _transitionTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: providerNodeID:%@; vendorID:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", NSStringFromClass([self class]), _providerNodeID, _vendorID, _announcementReason, [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; return descriptionString; } @end -@implementation MTRActionsClusterInstantActionWithTransitionParams (InternalMethods) +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.providerNodeID = self.providerNodeID.unsignedLongLongValue; } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); + } + { + encodableStruct.announcementReason = static_cast>(self.announcementReason.unsignedCharValue); + } + { + if (self.metadataForNode != nil) { + auto & definedValue_0 = encodableStruct.metadataForNode.Emplace(); + definedValue_0 = AsByteSpan(self.metadataForNode); } } { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + encodableStruct.endpoint = self.endpoint.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -5076,14 +4366,45 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterStartActionParams +@implementation MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams +@dynamic announcementReason; +@dynamic metadataForNode; +@dynamic endpoint; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end + +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (Deprecated) + +- (void)setProviderNodeId:(NSNumber * _Nonnull)providerNodeId +{ + self.providerNodeID = providerNodeId; +} + +- (NSNumber * _Nonnull)providerNodeId +{ + return self.providerNodeID; +} + +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} + +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} +@end +@implementation MTRGeneralCommissioningClusterArmFailSafeParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _expiryLengthSeconds = @(0); - _invokeID = nil; + _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5092,10 +4413,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStartActionParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.expiryLengthSeconds = self.expiryLengthSeconds; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5104,26 +4425,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _expiryLengthSeconds, _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterStartActionParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterArmFailSafeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::StartAction::Type encodableStruct; + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.expiryLengthSeconds = self.expiryLengthSeconds.unsignedShortValue; } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -5164,108 +4482,107 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterStartActionWithDurationParams +@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); - - _invokeID = nil; + _errorCode = @(0); - _duration = @(0); + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRActionsClusterStartActionWithDurationParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.actionID = self.actionID.unsignedShortValue; - } - { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } - } - { - encodableStruct.duration = self.duration.unsignedIntValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + self.debugText = AsString(decodableStruct.debugText); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterStopActionParams +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _newRegulatoryConfig = @(0); - _invokeID = nil; + _countryCode = @""; + + _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5274,10 +4591,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStopActionParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.newRegulatoryConfig = self.newRegulatoryConfig; + other.countryCode = self.countryCode; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5286,26 +4604,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _newRegulatoryConfig, _countryCode, _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterStopActionParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::StopAction::Type encodableStruct; + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.newRegulatoryConfig = static_cast>(self.newRegulatoryConfig.unsignedCharValue); + } + { + encodableStruct.countryCode = AsCharSpan(self.countryCode); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -5346,104 +4664,101 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterPauseActionParams +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _errorCode = @(0); - _invokeID = nil; + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterPauseActionParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRActionsClusterPauseActionParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Actions::Commands::PauseAction::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.actionID = self.actionID.unsignedShortValue; - } - { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + self.debugText = AsString(decodableStruct.debugText); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterPauseActionWithDurationParams +@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams - (instancetype)init { if (self = [super init]) { - - _actionID = @(0); - - _invokeID = nil; - - _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5452,11 +4767,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5465,30 +4777,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRActionsClusterPauseActionWithDurationParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type encodableStruct; + chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.actionID = self.actionID.unsignedShortValue; - } - { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } - } - { - encodableStruct.duration = self.duration.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -5528,102 +4828,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterResumeActionParams +@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _errorCode = @(0); - _invokeID = nil; + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterResumeActionParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRActionsClusterResumeActionParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Actions::Commands::ResumeAction::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.actionID = self.actionID.unsignedShortValue; - } - { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + self.debugText = AsString(decodableStruct.debugText); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterEnableActionParams +@implementation MTRNetworkCommissioningClusterScanNetworksParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _ssid = nil; - _invokeID = nil; + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5632,10 +4935,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterEnableActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.ssid = self.ssid; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5644,25 +4947,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterEnableActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterScanNetworksParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::EnableAction::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + if (self.ssid != nil) { + auto & definedValue_0 = encodableStruct.ssid.Emplace(); + if (self.ssid == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.ssid); + } + } } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; } } @@ -5704,108 +5015,183 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterEnableActionWithDurationParams +@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkingStatus = @(0); - _invokeID = nil; + _debugText = nil; - _duration = @(0); + _wiFiScanResults = nil; + + _threadScanResults = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.wiFiScanResults = self.wiFiScanResults; + other.threadScanResults = self.threadScanResults; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; wiFiScanResults:%@; threadScanResults:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _wiFiScanResults, _threadScanResults]; return descriptionString; } -@end - -@implementation MTRActionsClusterEnableActionWithDurationParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.actionID = self.actionID.unsignedShortValue; - } - { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } - } - { - encodableStruct.duration = self.duration.unsignedIntValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; + } + { + if (decodableStruct.debugText.HasValue()) { + self.debugText = AsString(decodableStruct.debugText.Value()); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.debugText = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.wiFiScanResults.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.wiFiScanResults.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct * newElement_1; + newElement_1 = [MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct new]; + newElement_1.security = [NSNumber numberWithUnsignedChar:entry_1.security.Raw()]; + newElement_1.ssid = AsData(entry_1.ssid); + newElement_1.bssid = AsData(entry_1.bssid); + newElement_1.channel = [NSNumber numberWithUnsignedShort:entry_1.channel]; + newElement_1.wiFiBand = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.wiFiBand)]; + newElement_1.rssi = [NSNumber numberWithChar:entry_1.rssi]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.wiFiScanResults = array_1; + } + } else { + self.wiFiScanResults = nil; } } - return decodedObj; + { + if (decodableStruct.threadScanResults.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.threadScanResults.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct * newElement_1; + newElement_1 = [MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct new]; + newElement_1.panId = [NSNumber numberWithUnsignedShort:entry_1.panId]; + newElement_1.extendedPanId = [NSNumber numberWithUnsignedLongLong:entry_1.extendedPanId]; + newElement_1.networkName = AsString(entry_1.networkName); + if (newElement_1.networkName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_1.channel = [NSNumber numberWithUnsignedShort:entry_1.channel]; + newElement_1.version = [NSNumber numberWithUnsignedChar:entry_1.version]; + newElement_1.extendedAddress = AsData(entry_1.extendedAddress); + newElement_1.rssi = [NSNumber numberWithChar:entry_1.rssi]; + newElement_1.lqi = [NSNumber numberWithUnsignedChar:entry_1.lqi]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.threadScanResults = array_1; + } + } else { + self.threadScanResults = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterDisableActionParams +@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _ssid = [NSData data]; - _invokeID = nil; + _credentials = [NSData data]; + + _breadcrumb = nil; + + _networkIdentity = nil; + + _clientIdentifier = nil; + + _possessionNonce = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5814,10 +5200,14 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterDisableActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.ssid = self.ssid; + other.credentials = self.credentials; + other.breadcrumb = self.breadcrumb; + other.networkIdentity = self.networkIdentity; + other.clientIdentifier = self.clientIdentifier; + other.possessionNonce = self.possessionNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5826,25 +5216,46 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; credentials:%@; breadcrumb:%@; networkIdentity:%@; clientIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], [_credentials base64EncodedStringWithOptions:0], _breadcrumb, [_networkIdentity base64EncodedStringWithOptions:0], [_clientIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRActionsClusterDisableActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::DisableAction::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.ssid = AsByteSpan(self.ssid); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + encodableStruct.credentials = AsByteSpan(self.credentials); + } + { + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; + } + } + { + if (self.networkIdentity != nil) { + auto & definedValue_0 = encodableStruct.networkIdentity.Emplace(); + definedValue_0 = AsByteSpan(self.networkIdentity); + } + } + { + if (self.clientIdentifier != nil) { + auto & definedValue_0 = encodableStruct.clientIdentifier.Emplace(); + definedValue_0 = AsByteSpan(self.clientIdentifier); + } + } + { + if (self.possessionNonce != nil) { + auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); + definedValue_0 = AsByteSpan(self.possessionNonce); } } @@ -5886,16 +5297,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterDisableActionWithDurationParams +@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); - - _invokeID = nil; + _operationalDataset = [NSData data]; - _duration = @(0); + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5904,11 +5313,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.operationalDataset = self.operationalDataset; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5917,30 +5325,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationalDataset:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_operationalDataset base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterDisableActionWithDurationParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.operationalDataset = AsByteSpan(self.operationalDataset); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; } } - { - encodableStruct.duration = self.duration.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -5980,53 +5385,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBasicClusterMfgSpecificPingParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams +@implementation MTRNetworkCommissioningClusterRemoveNetworkParams - (instancetype)init { if (self = [super init]) { - _vendorID = @(0); - - _productID = @(0); - - _softwareVersion = @(0); - - _protocolsSupported = [NSArray array]; - - _hardwareVersion = nil; - - _location = nil; - - _requestorCanConsent = nil; + _networkID = [NSData data]; - _metadataForProvider = nil; + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6035,16 +5401,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; - other.vendorID = self.vendorID; - other.productID = self.productID; - other.softwareVersion = self.softwareVersion; - other.protocolsSupported = self.protocolsSupported; - other.hardwareVersion = self.hardwareVersion; - other.location = self.location; - other.requestorCanConsent = self.requestorCanConsent; - other.metadataForProvider = self.metadataForProvider; + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6053,73 +5413,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: vendorID:%@; productID:%@; softwareVersion:%@; protocolsSupported:%@; hardwareVersion:%@; location:%@; requestorCanConsent:%@; metadataForProvider:%@; >", NSStringFromClass([self class]), _vendorID, _productID, _softwareVersion, _protocolsSupported, _hardwareVersion, _location, _requestorCanConsent, [_metadataForProvider base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterRemoveNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); - } - { - encodableStruct.productID = self.productID.unsignedShortValue; - } - { - encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; - } - { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(self.protocolsSupported.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.protocolsSupported.count; ++i_0) { - if (![self.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) self.protocolsSupported[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>(element_0.unsignedCharValue); - } - encodableStruct.protocolsSupported = ListType_0(listHolder_0->mList, self.protocolsSupported.count); - } else { - encodableStruct.protocolsSupported = ListType_0(); - } - } - } - { - if (self.hardwareVersion != nil) { - auto & definedValue_0 = encodableStruct.hardwareVersion.Emplace(); - definedValue_0 = self.hardwareVersion.unsignedShortValue; - } - } - { - if (self.location != nil) { - auto & definedValue_0 = encodableStruct.location.Emplace(); - definedValue_0 = AsCharSpan(self.location); - } - } - { - if (self.requestorCanConsent != nil) { - auto & definedValue_0 = encodableStruct.requestorCanConsent.Emplace(); - definedValue_0 = self.requestorCanConsent.boolValue; - } + encodableStruct.networkID = AsByteSpan(self.networkID); } { - if (self.metadataForProvider != nil) { - auto & definedValue_0 = encodableStruct.metadataForProvider.Emplace(); - definedValue_0 = AsByteSpan(self.metadataForProvider); + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; } } @@ -6161,60 +5473,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateProviderClusterQueryImageParams -@dynamic softwareVersion; -@dynamic protocolsSupported; -@dynamic hardwareVersion; -@dynamic location; -@dynamic requestorCanConsent; -@dynamic metadataForProvider; - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end - -@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (Deprecated) - -- (void)setVendorId:(NSNumber * _Nonnull)vendorId -{ - self.vendorID = vendorId; -} - -- (NSNumber * _Nonnull)vendorId -{ - return self.vendorID; -} - -- (void)setProductId:(NSNumber * _Nonnull)productId -{ - self.productID = productId; -} - -- (NSNumber * _Nonnull)productId -{ - return self.productID; -} -@end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams +@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _delayedActionTime = nil; - - _imageURI = nil; - - _softwareVersion = nil; + _networkingStatus = @(0); - _softwareVersionString = nil; + _debugText = nil; - _updateToken = nil; + _networkIndex = nil; - _userConsentNeeded = nil; + _clientIdentity = nil; - _metadataForRequestor = nil; + _possessionSignature = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -6222,16 +5494,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; - other.status = self.status; - other.delayedActionTime = self.delayedActionTime; - other.imageURI = self.imageURI; - other.softwareVersion = self.softwareVersion; - other.softwareVersionString = self.softwareVersionString; - other.updateToken = self.updateToken; - other.userConsentNeeded = self.userConsentNeeded; - other.metadataForRequestor = self.metadataForRequestor; + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.networkIndex = self.networkIndex; + other.clientIdentity = self.clientIdentity; + other.possessionSignature = self.possessionSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -6239,7 +5508,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; delayedActionTime:%@; imageURI:%@; softwareVersion:%@; softwareVersionString:%@; updateToken:%@; userConsentNeeded:%@; metadataForRequestor:%@; >", NSStringFromClass([self class]), _status, _delayedActionTime, _imageURI, _softwareVersion, _softwareVersionString, [_updateToken base64EncodedStringWithOptions:0], _userConsentNeeded, [_metadataForRequestor base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; clientIdentity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _networkIndex, [_clientIdentity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -6250,7 +5519,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; + using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -6285,68 +5554,43 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &)decodableStruct { { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - if (decodableStruct.delayedActionTime.HasValue()) { - self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime.Value()]; - } else { - self.delayedActionTime = nil; - } - } - { - if (decodableStruct.imageURI.HasValue()) { - self.imageURI = AsString(decodableStruct.imageURI.Value()); - if (self.imageURI == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.imageURI = nil; - } - } - { - if (decodableStruct.softwareVersion.HasValue()) { - self.softwareVersion = [NSNumber numberWithUnsignedInt:decodableStruct.softwareVersion.Value()]; - } else { - self.softwareVersion = nil; - } + self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; } { - if (decodableStruct.softwareVersionString.HasValue()) { - self.softwareVersionString = AsString(decodableStruct.softwareVersionString.Value()); - if (self.softwareVersionString == nil) { + if (decodableStruct.debugText.HasValue()) { + self.debugText = AsString(decodableStruct.debugText.Value()); + if (self.debugText == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } } else { - self.softwareVersionString = nil; + self.debugText = nil; } } { - if (decodableStruct.updateToken.HasValue()) { - self.updateToken = AsData(decodableStruct.updateToken.Value()); + if (decodableStruct.networkIndex.HasValue()) { + self.networkIndex = [NSNumber numberWithUnsignedChar:decodableStruct.networkIndex.Value()]; } else { - self.updateToken = nil; + self.networkIndex = nil; } } { - if (decodableStruct.userConsentNeeded.HasValue()) { - self.userConsentNeeded = [NSNumber numberWithBool:decodableStruct.userConsentNeeded.Value()]; + if (decodableStruct.clientIdentity.HasValue()) { + self.clientIdentity = AsData(decodableStruct.clientIdentity.Value()); } else { - self.userConsentNeeded = nil; + self.clientIdentity = nil; } } { - if (decodableStruct.metadataForRequestor.HasValue()) { - self.metadataForRequestor = AsData(decodableStruct.metadataForRequestor.Value()); + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); } else { - self.metadataForRequestor = nil; + self.possessionSignature = nil; } } return CHIP_NO_ERROR; @@ -6354,26 +5598,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftw @end -@implementation MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams -@dynamic status; -@dynamic delayedActionTime; -@dynamic imageURI; -@dynamic softwareVersion; -@dynamic softwareVersionString; -@dynamic updateToken; -@dynamic userConsentNeeded; -@dynamic metadataForRequestor; - -@dynamic timedInvokeTimeoutMs; -@end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams +@implementation MTRNetworkCommissioningClusterConnectNetworkParams - (instancetype)init { if (self = [super init]) { - _updateToken = [NSData data]; + _networkID = [NSData data]; - _newVersion = @(0); + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6382,10 +5614,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; - other.updateToken = self.updateToken; - other.newVersion = self.newVersion; + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6394,23 +5626,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; newVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _newVersion]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterConnectNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.updateToken = AsByteSpan(self.updateToken); + encodableStruct.networkID = AsByteSpan(self.networkID); } { - encodableStruct.newVersion = self.newVersion.unsignedIntValue; + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -6451,21 +5686,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams -@dynamic updateToken; -@dynamic newVersion; - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams +@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams - (instancetype)init { if (self = [super init]) { - _action = @(0); + _networkingStatus = @(0); - _delayedActionTime = @(0); + _debugText = nil; + + _errorValue = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -6473,10 +5703,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; - other.action = self.action; - other.delayedActionTime = self.delayedActionTime; + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.errorValue = self.errorValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -6484,7 +5715,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _errorValue]; return descriptionString; } @@ -6495,7 +5726,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; + using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -6530,35 +5761,46 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &)decodableStruct { { - self.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.action)]; + self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; } { - self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime]; + if (decodableStruct.debugText.HasValue()) { + self.debugText = AsString(decodableStruct.debugText.Value()); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.debugText = nil; + } + } + { + if (decodableStruct.errorValue.IsNull()) { + self.errorValue = nil; + } else { + self.errorValue = [NSNumber numberWithInt:decodableStruct.errorValue.Value()]; + } } return CHIP_NO_ERROR; } @end -@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams -@dynamic action; -@dynamic delayedActionTime; - -@dynamic timedInvokeTimeoutMs; -@end -@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams +@implementation MTRNetworkCommissioningClusterReorderNetworkParams - (instancetype)init { if (self = [super init]) { - _updateToken = [NSData data]; + _networkID = [NSData data]; - _softwareVersion = @(0); + _networkIndex = @(0); + + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6567,10 +5809,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; - other.updateToken = self.updateToken; - other.softwareVersion = self.softwareVersion; + other.networkID = self.networkID; + other.networkIndex = self.networkIndex; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6579,23 +5822,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; softwareVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _softwareVersion]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; networkIndex:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _networkIndex, _breadcrumb]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterReorderNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.updateToken = AsByteSpan(self.updateToken); + encodableStruct.networkID = AsByteSpan(self.networkID); } { - encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; + encodableStruct.networkIndex = self.networkIndex.unsignedCharValue; + } + { + if (self.breadcrumb != nil) { + auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); + definedValue_0 = self.breadcrumb.unsignedLongLongValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -6636,27 +5885,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams -@dynamic updateToken; -@dynamic softwareVersion; - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams +@implementation MTRNetworkCommissioningClusterQueryIdentityParams - (instancetype)init { if (self = [super init]) { - _providerNodeID = @(0); - - _vendorID = @(0); - - _announcementReason = @(0); - - _metadataForNode = nil; + _keyIdentifier = [NSData data]; - _endpoint = @(0); + _possessionNonce = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6665,13 +5901,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; - other.providerNodeID = self.providerNodeID; - other.vendorID = self.vendorID; - other.announcementReason = self.announcementReason; - other.metadataForNode = self.metadataForNode; - other.endpoint = self.endpoint; + other.keyIdentifier = self.keyIdentifier; + other.possessionNonce = self.possessionNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6680,36 +5913,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: providerNodeID:%@; vendorID:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", NSStringFromClass([self class]), _providerNodeID, _vendorID, _announcementReason, [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_keyIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type encodableStruct; ListFreer listFreer; { - encodableStruct.providerNodeID = self.providerNodeID.unsignedLongLongValue; - } - { - encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); - } - { - encodableStruct.announcementReason = static_cast>(self.announcementReason.unsignedCharValue); + encodableStruct.keyIdentifier = AsByteSpan(self.keyIdentifier); } { - if (self.metadataForNode != nil) { - auto & definedValue_0 = encodableStruct.metadataForNode.Emplace(); - definedValue_0 = AsByteSpan(self.metadataForNode); + if (self.possessionNonce != nil) { + auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); + definedValue_0 = AsByteSpan(self.possessionNonce); } } - { - encodableStruct.endpoint = self.endpoint.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -6749,45 +5973,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams -@dynamic announcementReason; -@dynamic metadataForNode; -@dynamic endpoint; +@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _identity = [NSData data]; + + _possessionSignature = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRNetworkCommissioningClusterQueryIdentityResponseParams alloc] init]; + + other.identity = self.identity; + other.possessionSignature = self.possessionSignature; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), [_identity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; @end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (Deprecated) - -- (void)setProviderNodeId:(NSNumber * _Nonnull)providerNodeId -{ - self.providerNodeID = providerNodeId; -} - -- (NSNumber * _Nonnull)providerNodeId -{ - return self.providerNodeID; -} +@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) -- (void)setVendorId:(NSNumber * _Nonnull)vendorId +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType &)decodableStruct { - self.vendorID = vendorId; + { + self.identity = AsData(decodableStruct.identity); + } + { + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + } else { + self.possessionSignature = nil; + } + } + return CHIP_NO_ERROR; } -- (NSNumber * _Nonnull)vendorId -{ - return self.vendorID; -} @end -@implementation MTRGeneralCommissioningClusterArmFailSafeParams + +@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams - (instancetype)init { if (self = [super init]) { - _expiryLengthSeconds = @(0); + _intent = @(0); - _breadcrumb = @(0); + _requestedProtocol = @(0); + + _transferFileDesignator = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6796,10 +6080,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; - other.expiryLengthSeconds = self.expiryLengthSeconds; - other.breadcrumb = self.breadcrumb; + other.intent = self.intent; + other.requestedProtocol = self.requestedProtocol; + other.transferFileDesignator = self.transferFileDesignator; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6808,23 +6093,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _expiryLengthSeconds, _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: intent:%@; requestedProtocol:%@; transferFileDesignator:%@; >", NSStringFromClass([self class]), _intent, _requestedProtocol, _transferFileDesignator]; return descriptionString; } @end -@implementation MTRGeneralCommissioningClusterArmFailSafeParams (InternalMethods) +@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type encodableStruct; + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.expiryLengthSeconds = self.expiryLengthSeconds.unsignedShortValue; + encodableStruct.intent = static_cast>(self.intent.unsignedCharValue); } { - encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; + encodableStruct.requestedProtocol = static_cast>(self.requestedProtocol.unsignedCharValue); + } + { + if (self.transferFileDesignator != nil) { + auto & definedValue_0 = encodableStruct.transferFileDesignator.Emplace(); + definedValue_0 = AsCharSpan(self.transferFileDesignator); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -6865,14 +6156,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams - (instancetype)init { if (self = [super init]) { - _errorCode = @(0); + _status = @(0); - _debugText = @""; + _logContent = [NSData data]; + + _utcTimeStamp = nil; + + _timeSinceBoot = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -6880,10 +6175,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; + other.status = self.status; + other.logContent = self.logContent; + other.utcTimeStamp = self.utcTimeStamp; + other.timeSinceBoot = self.timeSinceBoot; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -6891,7 +6188,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; logContent:%@; utcTimeStamp:%@; timeSinceBoot:%@; >", NSStringFromClass([self class]), _status, [_logContent base64EncodedStringWithOptions:0], _utcTimeStamp, _timeSinceBoot]; return descriptionString; } @@ -6902,7 +6199,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType; + using DecodableType = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -6937,18 +6234,28 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams (InternalMethods) +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &)decodableStruct { { - self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - self.debugText = AsString(decodableStruct.debugText); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + self.logContent = AsData(decodableStruct.logContent); + } + { + if (decodableStruct.UTCTimeStamp.HasValue()) { + self.utcTimeStamp = [NSNumber numberWithUnsignedLongLong:decodableStruct.UTCTimeStamp.Value()]; + } else { + self.utcTimeStamp = nil; + } + } + { + if (decodableStruct.timeSinceBoot.HasValue()) { + self.timeSinceBoot = [NSNumber numberWithUnsignedLongLong:decodableStruct.timeSinceBoot.Value()]; + } else { + self.timeSinceBoot = nil; } } return CHIP_NO_ERROR; @@ -6956,16 +6263,36 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralC @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) + +- (void)setContent:(NSData * _Nonnull)content +{ + self.logContent = content; +} + +- (NSData * _Nonnull)content +{ + return self.logContent; +} + +- (void)setTimeStamp:(NSNumber * _Nullable)timeStamp +{ + self.utcTimeStamp = timeStamp; +} + +- (NSNumber * _Nullable)timeStamp +{ + return self.utcTimeStamp; +} +@end +@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams - (instancetype)init { if (self = [super init]) { - _newRegulatoryConfig = @(0); - - _countryCode = @""; + _enableKey = [NSData data]; - _breadcrumb = @(0); + _eventTrigger = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6974,11 +6301,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - other.newRegulatoryConfig = self.newRegulatoryConfig; - other.countryCode = self.countryCode; - other.breadcrumb = self.breadcrumb; + other.enableKey = self.enableKey; + other.eventTrigger = self.eventTrigger; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6987,27 +6313,97 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _newRegulatoryConfig, _countryCode, _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enableKey:%@; eventTrigger:%@; >", NSStringFromClass([self class]), [_enableKey base64EncodedStringWithOptions:0], _eventTrigger]; return descriptionString; } @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams (InternalMethods) +@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type encodableStruct; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newRegulatoryConfig = static_cast>(self.newRegulatoryConfig.unsignedCharValue); + encodableStruct.enableKey = AsByteSpan(self.enableKey); } { - encodableStruct.countryCode = AsCharSpan(self.countryCode); + encodableStruct.eventTrigger = self.eventTrigger.unsignedLongLongValue; } - { - encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::Type encodableStruct; + ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -7047,33 +6443,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams - (instancetype)init { if (self = [super init]) { - _errorCode = @(0); + _systemTimeMs = @(0); - _debugText = @""; - _timedInvokeTimeoutMs = nil; + _posixTimeMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; + auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.systemTimeMs = self.systemTimeMs; + other.posixTimeMs = self.posixTimeMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeMs:%@; posixTimeMs:%@; >", NSStringFromClass([self class]), _systemTimeMs, _posixTimeMs]; return descriptionString; } @@ -7084,7 +6478,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; + using DecodableType = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -7119,18 +6513,18 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams (InternalMethods) +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType &)decodableStruct { { - self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; + self.systemTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeMs]; } { - self.debugText = AsString(decodableStruct.debugText); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + if (decodableStruct.posixTimeMs.IsNull()) { + self.posixTimeMs = nil; + } else { + self.posixTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.posixTimeMs.Value()]; } } return CHIP_NO_ERROR; @@ -7138,7 +6532,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralC @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams +@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams - (instancetype)init { if (self = [super init]) { @@ -7150,7 +6544,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7166,11 +6560,11 @@ - (NSString *)description @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams (InternalMethods) +@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type encodableStruct; + chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -7211,105 +6605,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams +@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams - (instancetype)init { if (self = [super init]) { - - _errorCode = @(0); - - _debugText = @""; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; + auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - self.debugText = AsString(decodableStruct.debugText); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRNetworkCommissioningClusterScanNetworksParams +@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams - (instancetype)init { if (self = [super init]) { - - _ssid = nil; - - _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7318,10 +6690,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; + auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; - other.ssid = self.ssid; - other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7330,35 +6700,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterScanNetworksParams (InternalMethods) +@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type encodableStruct; + chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; ListFreer listFreer; - { - if (self.ssid != nil) { - auto & definedValue_0 = encodableStruct.ssid.Emplace(); - if (self.ssid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = AsByteSpan(self.ssid); - } - } - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -7398,183 +6751,89 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams +@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams - (instancetype)init { if (self = [super init]) { - - _networkingStatus = @(0); - - _debugText = nil; - - _wiFiScanResults = nil; - - _threadScanResults = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; + auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.wiFiScanResults = self.wiFiScanResults; - other.threadScanResults = self.threadScanResults; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; wiFiScanResults:%@; threadScanResults:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _wiFiScanResults, _threadScanResults]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; - } - { - if (decodableStruct.debugText.HasValue()) { - self.debugText = AsString(decodableStruct.debugText.Value()); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.debugText = nil; - } - } - { - if (decodableStruct.wiFiScanResults.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.wiFiScanResults.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct * newElement_1; - newElement_1 = [MTRNetworkCommissioningClusterWiFiInterfaceScanResultStruct new]; - newElement_1.security = [NSNumber numberWithUnsignedChar:entry_1.security.Raw()]; - newElement_1.ssid = AsData(entry_1.ssid); - newElement_1.bssid = AsData(entry_1.bssid); - newElement_1.channel = [NSNumber numberWithUnsignedShort:entry_1.channel]; - newElement_1.wiFiBand = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.wiFiBand)]; - newElement_1.rssi = [NSNumber numberWithChar:entry_1.rssi]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.wiFiScanResults = array_1; - } - } else { - self.wiFiScanResults = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.threadScanResults.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.threadScanResults.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct * newElement_1; - newElement_1 = [MTRNetworkCommissioningClusterThreadInterfaceScanResultStruct new]; - newElement_1.panId = [NSNumber numberWithUnsignedShort:entry_1.panId]; - newElement_1.extendedPanId = [NSNumber numberWithUnsignedLongLong:entry_1.extendedPanId]; - newElement_1.networkName = AsString(entry_1.networkName); - if (newElement_1.networkName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - newElement_1.channel = [NSNumber numberWithUnsignedShort:entry_1.channel]; - newElement_1.version = [NSNumber numberWithUnsignedChar:entry_1.version]; - newElement_1.extendedAddress = AsData(entry_1.extendedAddress); - newElement_1.rssi = [NSNumber numberWithChar:entry_1.rssi]; - newElement_1.lqi = [NSNumber numberWithUnsignedChar:entry_1.lqi]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.threadScanResults = array_1; - } - } else { - self.threadScanResults = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams +@implementation MTRTimeSynchronizationClusterSetUTCTimeParams - (instancetype)init { if (self = [super init]) { - _ssid = [NSData data]; - - _credentials = [NSData data]; - - _breadcrumb = nil; - - _networkIdentity = nil; + _utcTime = @(0); - _clientIdentifier = nil; + _granularity = @(0); - _possessionNonce = nil; + _timeSource = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7583,14 +6842,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; - other.ssid = self.ssid; - other.credentials = self.credentials; - other.breadcrumb = self.breadcrumb; - other.networkIdentity = self.networkIdentity; - other.clientIdentifier = self.clientIdentifier; - other.possessionNonce = self.possessionNonce; + other.utcTime = self.utcTime; + other.granularity = self.granularity; + other.timeSource = self.timeSource; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7599,46 +6855,28 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; credentials:%@; breadcrumb:%@; networkIdentity:%@; clientIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], [_credentials base64EncodedStringWithOptions:0], _breadcrumb, [_networkIdentity base64EncodedStringWithOptions:0], [_clientIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: utcTime:%@; granularity:%@; timeSource:%@; >", NSStringFromClass([self class]), _utcTime, _granularity, _timeSource]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetUTCTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type encodableStruct; ListFreer listFreer; { - encodableStruct.ssid = AsByteSpan(self.ssid); - } - { - encodableStruct.credentials = AsByteSpan(self.credentials); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } - } - { - if (self.networkIdentity != nil) { - auto & definedValue_0 = encodableStruct.networkIdentity.Emplace(); - definedValue_0 = AsByteSpan(self.networkIdentity); - } + encodableStruct.UTCTime = self.utcTime.unsignedLongLongValue; } { - if (self.clientIdentifier != nil) { - auto & definedValue_0 = encodableStruct.clientIdentifier.Emplace(); - definedValue_0 = AsByteSpan(self.clientIdentifier); - } + encodableStruct.granularity = static_cast>(self.granularity.unsignedCharValue); } { - if (self.possessionNonce != nil) { - auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); - definedValue_0 = AsByteSpan(self.possessionNonce); + if (self.timeSource != nil) { + auto & definedValue_0 = encodableStruct.timeSource.Emplace(); + definedValue_0 = static_cast>(self.timeSource.unsignedCharValue); } } @@ -7680,14 +6918,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams +@implementation MTRTimeSynchronizationClusterSetUtcTimeParams +@dynamic utcTime; +@dynamic granularity; +@dynamic timeSource; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams - (instancetype)init { if (self = [super init]) { - _operationalDataset = [NSData data]; - - _breadcrumb = nil; + _trustedTimeSource = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7696,10 +6940,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; - other.operationalDataset = self.operationalDataset; - other.breadcrumb = self.breadcrumb; + other.trustedTimeSource = self.trustedTimeSource; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7708,25 +6951,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationalDataset:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_operationalDataset base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: trustedTimeSource:%@; >", NSStringFromClass([self class]), _trustedTimeSource]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type encodableStruct; ListFreer listFreer; { - encodableStruct.operationalDataset = AsByteSpan(self.operationalDataset); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; + if (self.trustedTimeSource == nil) { + encodableStruct.trustedTimeSource.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.trustedTimeSource.SetNonNull(); + nonNullValue_0.nodeID = self.trustedTimeSource.nodeID.unsignedLongLongValue; + nonNullValue_0.endpoint = self.trustedTimeSource.endpoint.unsignedShortValue; } } @@ -7768,14 +7011,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterRemoveNetworkParams +@implementation MTRTimeSynchronizationClusterSetTimeZoneParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; - - _breadcrumb = nil; + _timeZone = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7784,10 +7025,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; - other.networkID = self.networkID; - other.breadcrumb = self.breadcrumb; + other.timeZone = self.timeZone; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7796,25 +7036,45 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeZone:%@; >", NSStringFromClass([self class]), _timeZone]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterRemoveNetworkParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetTimeZoneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.timeZone.count != 0) { + auto * listHolder_0 = new ListHolder(self.timeZone.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.timeZone.count; ++i_0) { + if (![self.timeZone[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) self.timeZone[i_0]; + listHolder_0->mList[i_0].offset = element_0.offset.intValue; + listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = AsCharSpan(element_0.name); + } + } + encodableStruct.timeZone = ListType_0(listHolder_0->mList, self.timeZone.count); + } else { + encodableStruct.timeZone = ListType_0(); + } } } @@ -7856,42 +7116,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams +@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams - (instancetype)init { if (self = [super init]) { - _networkingStatus = @(0); - - _debugText = nil; - - _networkIndex = nil; - - _clientIdentity = nil; - - _possessionSignature = nil; - _timedInvokeTimeoutMs = nil; + _dstOffsetRequired = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTimeZoneResponseParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.networkIndex = self.networkIndex; - other.clientIdentity = self.clientIdentity; - other.possessionSignature = self.possessionSignature; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.dstOffsetRequired = self.dstOffsetRequired; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; networkIndex:%@; clientIdentity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _networkIndex, [_clientIdentity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffsetRequired:%@; >", NSStringFromClass([self class]), _dstOffsetRequired]; return descriptionString; } @@ -7902,7 +7148,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; + using DecodableType = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -7925,70 +7171,36 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r } } } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &)decodableStruct -{ - { - self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; - } - { - if (decodableStruct.debugText.HasValue()) { - self.debugText = AsString(decodableStruct.debugText.Value()); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.debugText = nil; - } - } - { - if (decodableStruct.networkIndex.HasValue()) { - self.networkIndex = [NSNumber numberWithUnsignedChar:decodableStruct.networkIndex.Value()]; - } else { - self.networkIndex = nil; - } - } - { - if (decodableStruct.clientIdentity.HasValue()) { - self.clientIdentity = AsData(decodableStruct.clientIdentity.Value()); - } else { - self.clientIdentity = nil; - } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; } + return nil; +} + +@end + +@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType &)decodableStruct +{ { - if (decodableStruct.possessionSignature.HasValue()) { - self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); - } else { - self.possessionSignature = nil; - } + self.dstOffsetRequired = [NSNumber numberWithBool:decodableStruct.DSTOffsetRequired]; } return CHIP_NO_ERROR; } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkParams +@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; - - _breadcrumb = nil; + _dstOffset = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7997,10 +7209,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; - other.networkID = self.networkID; - other.breadcrumb = self.breadcrumb; + other.dstOffset = self.dstOffset; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8009,25 +7220,47 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffset:%@; >", NSStringFromClass([self class]), _dstOffset]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.dstOffset.count != 0) { + auto * listHolder_0 = new ListHolder(self.dstOffset.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.dstOffset.count; ++i_0) { + if (![self.dstOffset[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) self.dstOffset[i_0]; + listHolder_0->mList[i_0].offset = element_0.offset.intValue; + listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; + if (element_0.validUntil == nil) { + listHolder_0->mList[i_0].validUntil.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].validUntil.SetNonNull(); + nonNullValue_2 = element_0.validUntil.unsignedLongLongValue; + } + } + encodableStruct.DSTOffset = ListType_0(listHolder_0->mList, self.dstOffset.count); + } else { + encodableStruct.DSTOffset = ListType_0(); + } } } @@ -8069,121 +7302,104 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams +@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams - (instancetype)init { if (self = [super init]) { - _networkingStatus = @(0); - - _debugText = nil; - - _errorValue = nil; + _defaultNTP = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.errorValue = self.errorValue; + other.defaultNTP = self.defaultNTP; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _errorValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: defaultNTP:%@; >", NSStringFromClass([self class]), _defaultNTP]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type encodableStruct; + ListFreer listFreer; + { + if (self.defaultNTP == nil) { + encodableStruct.defaultNTP.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.defaultNTP.SetNonNull(); + nonNullValue_0 = AsCharSpan(self.defaultNTP); + } } - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; - } - { - if (decodableStruct.debugText.HasValue()) { - self.debugText = AsString(decodableStruct.debugText.Value()); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.debugText = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.errorValue.IsNull()) { - self.errorValue = nil; - } else { - self.errorValue = [NSNumber numberWithInt:decodableStruct.errorValue.Value()]; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRNetworkCommissioningClusterReorderNetworkParams +@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; + _commissioningTimeout = @(0); - _networkIndex = @(0); + _pakePasscodeVerifier = [NSData data]; - _breadcrumb = nil; + _discriminator = @(0); + + _iterations = @(0); + + _salt = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8192,11 +7408,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - other.networkID = self.networkID; - other.networkIndex = self.networkIndex; - other.breadcrumb = self.breadcrumb; + other.commissioningTimeout = self.commissioningTimeout; + other.pakePasscodeVerifier = self.pakePasscodeVerifier; + other.discriminator = self.discriminator; + other.iterations = self.iterations; + other.salt = self.salt; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8205,29 +7423,32 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; networkIndex:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _networkIndex, _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commissioningTimeout:%@; pakePasscodeVerifier:%@; discriminator:%@; iterations:%@; salt:%@; >", NSStringFromClass([self class]), _commissioningTimeout, [_pakePasscodeVerifier base64EncodedStringWithOptions:0], _discriminator, _iterations, [_salt base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterReorderNetworkParams (InternalMethods) +@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type encodableStruct; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); + encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; } { - encodableStruct.networkIndex = self.networkIndex.unsignedCharValue; + encodableStruct.PAKEPasscodeVerifier = AsByteSpan(self.pakePasscodeVerifier); } { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } + encodableStruct.discriminator = self.discriminator.unsignedShortValue; + } + { + encodableStruct.iterations = self.iterations.unsignedIntValue; + } + { + encodableStruct.salt = AsByteSpan(self.salt); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8268,14 +7489,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityParams +@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) + +- (void)setPakeVerifier:(NSData * _Nonnull)pakeVerifier +{ + self.pakePasscodeVerifier = pakeVerifier; +} + +- (NSData * _Nonnull)pakeVerifier +{ + return self.pakePasscodeVerifier; +} +@end +@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams - (instancetype)init { if (self = [super init]) { - _keyIdentifier = [NSData data]; - - _possessionNonce = nil; + _commissioningTimeout = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8284,10 +7515,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - other.keyIdentifier = self.keyIdentifier; - other.possessionNonce = self.possessionNonce; + other.commissioningTimeout = self.commissioningTimeout; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8296,26 +7526,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_keyIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commissioningTimeout:%@; >", NSStringFromClass([self class]), _commissioningTimeout]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) +@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type encodableStruct; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type encodableStruct; ListFreer listFreer; { - encodableStruct.keyIdentifier = AsByteSpan(self.keyIdentifier); - } - { - if (self.possessionNonce != nil) { - auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); - definedValue_0 = AsByteSpan(self.possessionNonce); - } + encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8356,105 +7580,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams +@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams - (instancetype)init { if (self = [super init]) { - - _identity = [NSData data]; - - _possessionSignature = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterQueryIdentityResponseParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; - other.identity = self.identity; - other.possessionSignature = self.possessionSignature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: identity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), [_identity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.identity = AsData(decodableStruct.identity); + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - if (decodableStruct.possessionSignature.HasValue()) { - self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); - } else { - self.possessionSignature = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams +@implementation MTROperationalCredentialsClusterAttestationRequestParams - (instancetype)init { if (self = [super init]) { - _intent = @(0); - - _requestedProtocol = @(0); - - _transferFileDesignator = nil; + _attestationNonce = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8463,11 +7667,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; - other.intent = self.intent; - other.requestedProtocol = self.requestedProtocol; - other.transferFileDesignator = self.transferFileDesignator; + other.attestationNonce = self.attestationNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8476,29 +7678,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: intent:%@; requestedProtocol:%@; transferFileDesignator:%@; >", NSStringFromClass([self class]), _intent, _requestedProtocol, _transferFileDesignator]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), [_attestationNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams (InternalMethods) +@implementation MTROperationalCredentialsClusterAttestationRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.intent = static_cast>(self.intent.unsignedCharValue); - } - { - encodableStruct.requestedProtocol = static_cast>(self.requestedProtocol.unsignedCharValue); - } - { - if (self.transferFileDesignator != nil) { - auto & definedValue_0 = encodableStruct.transferFileDesignator.Emplace(); - definedValue_0 = AsCharSpan(self.transferFileDesignator); - } + encodableStruct.attestationNonce = AsByteSpan(self.attestationNonce); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8539,18 +7732,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams +@implementation MTROperationalCredentialsClusterAttestationResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _logContent = [NSData data]; - - _utcTimeStamp = nil; + _attestationElements = [NSData data]; - _timeSinceBoot = nil; + _attestationSignature = [NSData data]; _timedInvokeTimeoutMs = nil; } return self; @@ -8558,12 +7747,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; - other.status = self.status; - other.logContent = self.logContent; - other.utcTimeStamp = self.utcTimeStamp; - other.timeSinceBoot = self.timeSinceBoot; + other.attestationElements = self.attestationElements; + other.attestationSignature = self.attestationSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -8571,7 +7758,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; logContent:%@; utcTimeStamp:%@; timeSinceBoot:%@; >", NSStringFromClass([self class]), _status, [_logContent base64EncodedStringWithOptions:0], _utcTimeStamp, _timeSinceBoot]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_attestationElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -8582,7 +7769,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -8600,6 +7787,79 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r err = chip::app::DataModel::Decode(reader, decodedStruct); if (err == CHIP_NO_ERROR) { err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + do { + // AttestationResponse has an extra attestationChallenge field. Once we + // have some sort of more direct decoding from the responseValue, we can + // probably make this less hardcoded. + // + // It might be simpler to look for the right profile tag in the TLV, but let's stick to examining + // the responseValue we were handed. + id data = responseValue[MTRDataKey]; + if (![data isKindOfClass:NSDictionary.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSDictionary * dataDictionary = data; + if (dataDictionary[MTRTypeKey] == nil || ![dataDictionary[MTRTypeKey] isKindOfClass:NSString.class] || ![dataDictionary[MTRTypeKey] isEqualToString:MTRStructureValueType]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + id value = dataDictionary[MTRValueKey]; + if (value == nil || ![value isKindOfClass:NSArray.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSArray * valueArray = value; + for (id item in valueArray) { + if (![item isKindOfClass:NSDictionary.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSDictionary * itemDictionary = item; + id contextTag = itemDictionary[MTRContextTagKey]; + if (contextTag == nil || ![contextTag isKindOfClass:NSNumber.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSNumber * contextTagNumber = contextTag; + if (![contextTagNumber isEqualToNumber:@(kAttestationChallengeTagValue)]) { + // Not the right field; keep going. + continue; + } + + id data = itemDictionary[MTRDataKey]; + if (data == nil || ![data isKindOfClass:NSDictionary.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSDictionary * dataDictionary = data; + id dataType = dataDictionary[MTRTypeKey]; + id dataValue = dataDictionary[MTRValueKey]; + if (dataType == nil || dataValue == nil || ![dataType isKindOfClass:NSString.class] || ![dataValue isKindOfClass:NSData.class]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + NSString * dataTypeString = dataType; + if (![dataTypeString isEqualToString:MTROctetStringValueType]) { + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + self.attestationChallenge = dataValue; + break; + } + + // Do not add code here without first checking whether err is success. + } while (0); + } if (err == CHIP_NO_ERROR) { return self; } @@ -8617,65 +7877,39 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (InternalMethods) +@implementation MTROperationalCredentialsClusterAttestationResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &)decodableStruct { { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; - } - { - self.logContent = AsData(decodableStruct.logContent); - } - { - if (decodableStruct.UTCTimeStamp.HasValue()) { - self.utcTimeStamp = [NSNumber numberWithUnsignedLongLong:decodableStruct.UTCTimeStamp.Value()]; - } else { - self.utcTimeStamp = nil; - } + self.attestationElements = AsData(decodableStruct.attestationElements); } { - if (decodableStruct.timeSinceBoot.HasValue()) { - self.timeSinceBoot = [NSNumber numberWithUnsignedLongLong:decodableStruct.timeSinceBoot.Value()]; - } else { - self.timeSinceBoot = nil; - } + self.attestationSignature = AsData(decodableStruct.attestationSignature); } return CHIP_NO_ERROR; } @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) - -- (void)setContent:(NSData * _Nonnull)content -{ - self.logContent = content; -} - -- (NSData * _Nonnull)content -{ - return self.logContent; -} +@implementation MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) -- (void)setTimeStamp:(NSNumber * _Nullable)timeStamp +- (void)setSignature:(NSData * _Nonnull)signature { - self.utcTimeStamp = timeStamp; + self.attestationSignature = signature; } -- (NSNumber * _Nullable)timeStamp +- (NSData * _Nonnull)signature { - return self.utcTimeStamp; + return self.attestationSignature; } @end -@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams +@implementation MTROperationalCredentialsClusterCertificateChainRequestParams - (instancetype)init { if (self = [super init]) { - _enableKey = [NSData data]; - - _eventTrigger = @(0); + _certificateType = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8684,10 +7918,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; - other.enableKey = self.enableKey; - other.eventTrigger = self.eventTrigger; + other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8696,23 +7929,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: enableKey:%@; eventTrigger:%@; >", NSStringFromClass([self class]), [_enableKey base64EncodedStringWithOptions:0], _eventTrigger]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificateType:%@; >", NSStringFromClass([self class]), _certificateType]; return descriptionString; } @end -@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCertificateChainRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.enableKey = AsByteSpan(self.enableKey); - } - { - encodableStruct.eventTrigger = self.eventTrigger.unsignedLongLongValue; + encodableStruct.certificateType = static_cast>(self.certificateType.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8753,10 +7983,95 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams +@implementation MTROperationalCredentialsClusterCertificateChainResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _certificate = [NSData data]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; + + other.certificate = self.certificate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificate:%@; >", NSStringFromClass([self class]), [_certificate base64EncodedStringWithOptions:0]]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTROperationalCredentialsClusterCertificateChainResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType &)decodableStruct +{ + { + self.certificate = AsData(decodableStruct.certificate); + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTROperationalCredentialsClusterCSRRequestParams - (instancetype)init { if (self = [super init]) { + + _csrNonce = [NSData data]; + + _isForUpdateNOC = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8765,8 +8080,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + other.csrNonce = self.csrNonce; + other.isForUpdateNOC = self.isForUpdateNOC; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8775,18 +8092,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: csrNonce:%@; isForUpdateNOC:%@; >", NSStringFromClass([self class]), [_csrNonce base64EncodedStringWithOptions:0], _isForUpdateNOC]; return descriptionString; } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCSRRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.CSRNonce = AsByteSpan(self.csrNonce); + } + { + if (self.isForUpdateNOC != nil) { + auto & definedValue_0 = encodableStruct.isForUpdateNOC.Emplace(); + definedValue_0 = self.isForUpdateNOC.boolValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -8826,31 +8152,33 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams +@implementation MTROperationalCredentialsClusterCSRResponseParams - (instancetype)init { if (self = [super init]) { - _systemTimeMs = @(0); + _nocsrElements = [NSData data]; - _posixTimeMs = nil; + _attestationSignature = [NSData data]; + _timedInvokeTimeoutMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; - other.systemTimeMs = self.systemTimeMs; - other.posixTimeMs = self.posixTimeMs; + other.nocsrElements = self.nocsrElements; + other.attestationSignature = self.attestationSignature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeMs:%@; posixTimeMs:%@; >", NSStringFromClass([self class]), _systemTimeMs, _posixTimeMs]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocsrElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_nocsrElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -8861,7 +8189,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -8896,29 +8224,135 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCSRResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &)decodableStruct +{ + { + self.nocsrElements = AsData(decodableStruct.NOCSRElements); + } + { + self.attestationSignature = AsData(decodableStruct.attestationSignature); + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTROperationalCredentialsClusterAddNOCParams +- (instancetype)init +{ + if (self = [super init]) { + + _nocValue = [NSData data]; + + _icacValue = nil; + + _ipkValue = [NSData data]; + + _caseAdminSubject = @(0); + + _adminVendorId = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; + other.ipkValue = self.ipkValue; + other.caseAdminSubject = self.caseAdminSubject; + other.adminVendorId = self.adminVendorId; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocValue:%@; icacValue:%@; ipkValue:%@; caseAdminSubject:%@; adminVendorId:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0], [_ipkValue base64EncodedStringWithOptions:0], _caseAdminSubject, _adminVendorId]; + return descriptionString; +} + +@end + +@implementation MTROperationalCredentialsClusterAddNOCParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.NOCValue = AsByteSpan(self.nocValue); + } + { + if (self.icacValue != nil) { + auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); + definedValue_0 = AsByteSpan(self.icacValue); + } + } + { + encodableStruct.IPKValue = AsByteSpan(self.ipkValue); + } + { + encodableStruct.caseAdminSubject = self.caseAdminSubject.unsignedLongLongValue; + } + { + encodableStruct.adminVendorId = static_cast>(self.adminVendorId.unsignedShortValue); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.systemTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeMs]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - if (decodableStruct.posixTimeMs.IsNull()) { - self.posixTimeMs = nil; - } else { - self.posixTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.posixTimeMs.Value()]; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams +@implementation MTROperationalCredentialsClusterUpdateNOCParams - (instancetype)init { if (self = [super init]) { + + _nocValue = [NSData data]; + + _icacValue = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8927,8 +8361,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8937,18 +8373,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocValue:%@; icacValue:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams (InternalMethods) +@implementation MTROperationalCredentialsClusterUpdateNOCParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.NOCValue = AsByteSpan(self.nocValue); + } + { + if (self.icacValue != nil) { + auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); + definedValue_0 = AsByteSpan(self.icacValue); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -8988,83 +8433,117 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams +@implementation MTROperationalCredentialsClusterNOCResponseParams - (instancetype)init { if (self = [super init]) { + + _statusCode = @(0); + + _fabricIndex = nil; + + _debugText = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; + other.statusCode = self.statusCode; + other.fabricIndex = self.fabricIndex; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", NSStringFromClass([self class]), _statusCode, _fabricIndex, _debugText]; return descriptionString; } -@end - -@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTROperationalCredentialsClusterNOCResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.statusCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.statusCode)]; + } + { + if (decodableStruct.fabricIndex.HasValue()) { + self.fabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.fabricIndex.Value()]; + } else { + self.fabricIndex = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.debugText.HasValue()) { + self.debugText = AsString(decodableStruct.debugText.Value()); + if (self.debugText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.debugText = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams +@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams - (instancetype)init { if (self = [super init]) { + + _label = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9073,8 +8552,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + other.label = self.label; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9083,18 +8563,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; return descriptionString; } @end -@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams (InternalMethods) +@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.label = AsCharSpan(self.label); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9134,10 +8617,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams +@implementation MTROperationalCredentialsClusterRemoveFabricParams - (instancetype)init { if (self = [super init]) { + + _fabricIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9146,8 +8631,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + other.fabricIndex = self.fabricIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9156,18 +8642,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } @end -@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams (InternalMethods) +@implementation MTROperationalCredentialsClusterRemoveFabricParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.fabricIndex = self.fabricIndex.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9207,16 +8696,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetUTCTimeParams +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams - (instancetype)init { if (self = [super init]) { - _utcTime = @(0); - - _granularity = @(0); - - _timeSource = nil; + _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9225,11 +8710,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - other.utcTime = self.utcTime; - other.granularity = self.granularity; - other.timeSource = self.timeSource; + other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9238,29 +8721,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: utcTime:%@; granularity:%@; timeSource:%@; >", NSStringFromClass([self class]), _utcTime, _granularity, _timeSource]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCACertificate:%@; >", NSStringFromClass([self class]), [_rootCACertificate base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetUTCTimeParams (InternalMethods) +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type encodableStruct; ListFreer listFreer; { - encodableStruct.UTCTime = self.utcTime.unsignedLongLongValue; - } - { - encodableStruct.granularity = static_cast>(self.granularity.unsignedCharValue); - } - { - if (self.timeSource != nil) { - auto & definedValue_0 = encodableStruct.timeSource.Emplace(); - definedValue_0 = static_cast>(self.timeSource.unsignedCharValue); - } + encodableStruct.rootCACertificate = AsByteSpan(self.rootCACertificate); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9301,20 +8775,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetUtcTimeParams -@dynamic utcTime; -@dynamic granularity; -@dynamic timeSource; +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; +- (void)setRootCertificate:(NSData * _Nonnull)rootCertificate +{ + self.rootCACertificate = rootCertificate; +} + +- (NSData * _Nonnull)rootCertificate +{ + return self.rootCACertificate; +} @end -@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams +@implementation MTRGroupKeyManagementClusterKeySetWriteParams - (instancetype)init { if (self = [super init]) { - _trustedTimeSource = nil; + _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9323,9 +8801,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - other.trustedTimeSource = self.trustedTimeSource; + other.groupKeySet = self.groupKeySet; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9334,25 +8812,56 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: trustedTimeSource:%@; >", NSStringFromClass([self class]), _trustedTimeSource]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetWriteParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type encodableStruct; ListFreer listFreer; { - if (self.trustedTimeSource == nil) { - encodableStruct.trustedTimeSource.SetNull(); + encodableStruct.groupKeySet.groupKeySetID = self.groupKeySet.groupKeySetID.unsignedShortValue; + encodableStruct.groupKeySet.groupKeySecurityPolicy = static_cast>(self.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); + if (self.groupKeySet.epochKey0 == nil) { + encodableStruct.groupKeySet.epochKey0.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey0.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey0); + } + if (self.groupKeySet.epochStartTime0 == nil) { + encodableStruct.groupKeySet.epochStartTime0.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime0.SetNonNull(); + nonNullValue_1 = self.groupKeySet.epochStartTime0.unsignedLongLongValue; + } + if (self.groupKeySet.epochKey1 == nil) { + encodableStruct.groupKeySet.epochKey1.SetNull(); } else { - auto & nonNullValue_0 = encodableStruct.trustedTimeSource.SetNonNull(); - nonNullValue_0.nodeID = self.trustedTimeSource.nodeID.unsignedLongLongValue; - nonNullValue_0.endpoint = self.trustedTimeSource.endpoint.unsignedShortValue; + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey1.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey1); + } + if (self.groupKeySet.epochStartTime1 == nil) { + encodableStruct.groupKeySet.epochStartTime1.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime1.SetNonNull(); + nonNullValue_1 = self.groupKeySet.epochStartTime1.unsignedLongLongValue; + } + if (self.groupKeySet.epochKey2 == nil) { + encodableStruct.groupKeySet.epochKey2.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey2.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey2); + } + if (self.groupKeySet.epochStartTime2 == nil) { + encodableStruct.groupKeySet.epochStartTime2.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime2.SetNonNull(); + nonNullValue_1 = self.groupKeySet.epochStartTime2.unsignedLongLongValue; } } @@ -9394,12 +8903,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneParams +@implementation MTRGroupKeyManagementClusterKeySetReadParams - (instancetype)init { if (self = [super init]) { - _timeZone = [NSArray array]; + _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9408,9 +8917,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - other.timeZone = self.timeZone; + other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9419,46 +8928,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeZone:%@; >", NSStringFromClass([self class]), _timeZone]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type encodableStruct; ListFreer listFreer; { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.timeZone.count != 0) { - auto * listHolder_0 = new ListHolder(self.timeZone.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.timeZone.count; ++i_0) { - if (![self.timeZone[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) self.timeZone[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = AsCharSpan(element_0.name); - } - } - encodableStruct.timeZone = ListType_0(listHolder_0->mList, self.timeZone.count); - } else { - encodableStruct.timeZone = ListType_0(); - } - } + encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9499,28 +8982,30 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams +@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams - (instancetype)init { if (self = [super init]) { - _dstOffsetRequired = @(0); + _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + _timedInvokeTimeoutMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTimeZoneResponseParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; - other.dstOffsetRequired = self.dstOffsetRequired; + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffsetRequired:%@; >", NSStringFromClass([self class]), _dstOffsetRequired]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; return descriptionString; } @@ -9531,7 +9016,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; + using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -9566,223 +9051,56 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType &)decodableStruct -{ - { - self.dstOffsetRequired = [NSNumber numberWithBool:decodableStruct.DSTOffsetRequired]; - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams -- (instancetype)init -{ - if (self = [super init]) { - - _dstOffset = [NSArray array]; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; - - other.dstOffset = self.dstOffset; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffset:%@; >", NSStringFromClass([self class]), _dstOffset]; - return descriptionString; -} - -@end - -@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &)decodableStruct { - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type encodableStruct; - ListFreer listFreer; { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.dstOffset.count != 0) { - auto * listHolder_0 = new ListHolder(self.dstOffset.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < self.dstOffset.count; ++i_0) { - if (![self.dstOffset[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) self.dstOffset[i_0]; - listHolder_0->mList[i_0].offset = element_0.offset.intValue; - listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; - if (element_0.validUntil == nil) { - listHolder_0->mList[i_0].validUntil.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].validUntil.SetNonNull(); - nonNullValue_2 = element_0.validUntil.unsignedLongLongValue; - } - } - encodableStruct.DSTOffset = ListType_0(listHolder_0->mList, self.dstOffset.count); - } else { - encodableStruct.DSTOffset = ListType_0(); - } + self.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + self.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:decodableStruct.groupKeySet.groupKeySetID]; + self.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.groupKeySet.groupKeySecurityPolicy)]; + if (decodableStruct.groupKeySet.epochKey0.IsNull()) { + self.groupKeySet.epochKey0 = nil; + } else { + self.groupKeySet.epochKey0 = AsData(decodableStruct.groupKeySet.epochKey0.Value()); } - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + if (decodableStruct.groupKeySet.epochStartTime0.IsNull()) { + self.groupKeySet.epochStartTime0 = nil; + } else { + self.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime0.Value()]; } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + if (decodableStruct.groupKeySet.epochKey1.IsNull()) { + self.groupKeySet.epochKey1 = nil; + } else { + self.groupKeySet.epochKey1 = AsData(decodableStruct.groupKeySet.epochKey1.Value()); } - } - return decodedObj; -} -@end - -@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams -- (instancetype)init -{ - if (self = [super init]) { - - _defaultNTP = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; - - other.defaultNTP = self.defaultNTP; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: defaultNTP:%@; >", NSStringFromClass([self class]), _defaultNTP]; - return descriptionString; -} - -@end - -@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type encodableStruct; - ListFreer listFreer; - { - if (self.defaultNTP == nil) { - encodableStruct.defaultNTP.SetNull(); + if (decodableStruct.groupKeySet.epochStartTime1.IsNull()) { + self.groupKeySet.epochStartTime1 = nil; } else { - auto & nonNullValue_0 = encodableStruct.defaultNTP.SetNonNull(); - nonNullValue_0 = AsCharSpan(self.defaultNTP); + self.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime1.Value()]; } - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + if (decodableStruct.groupKeySet.epochKey2.IsNull()) { + self.groupKeySet.epochKey2 = nil; + } else { + self.groupKeySet.epochKey2 = AsData(decodableStruct.groupKeySet.epochKey2.Value()); } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + if (decodableStruct.groupKeySet.epochStartTime2.IsNull()) { + self.groupKeySet.epochStartTime2 = nil; + } else { + self.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime2.Value()]; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams +@implementation MTRGroupKeyManagementClusterKeySetRemoveParams - (instancetype)init { if (self = [super init]) { - _commissioningTimeout = @(0); - - _pakePasscodeVerifier = [NSData data]; - - _discriminator = @(0); - - _iterations = @(0); - - _salt = [NSData data]; + _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9791,13 +9109,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - other.commissioningTimeout = self.commissioningTimeout; - other.pakePasscodeVerifier = self.pakePasscodeVerifier; - other.discriminator = self.discriminator; - other.iterations = self.iterations; - other.salt = self.salt; + other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9806,32 +9120,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commissioningTimeout:%@; pakePasscodeVerifier:%@; discriminator:%@; iterations:%@; salt:%@; >", NSStringFromClass([self class]), _commissioningTimeout, [_pakePasscodeVerifier base64EncodedStringWithOptions:0], _discriminator, _iterations, [_salt base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; return descriptionString; } @end -@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetRemoveParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type encodableStruct; ListFreer listFreer; { - encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; - } - { - encodableStruct.PAKEPasscodeVerifier = AsByteSpan(self.pakePasscodeVerifier); - } - { - encodableStruct.discriminator = self.discriminator.unsignedShortValue; - } - { - encodableStruct.iterations = self.iterations.unsignedIntValue; - } - { - encodableStruct.salt = AsByteSpan(self.salt); + encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9872,24 +9174,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) - -- (void)setPakeVerifier:(NSData * _Nonnull)pakeVerifier -{ - self.pakePasscodeVerifier = pakeVerifier; -} - -- (NSData * _Nonnull)pakeVerifier -{ - return self.pakePasscodeVerifier; -} -@end -@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams - (instancetype)init { if (self = [super init]) { - - _commissioningTimeout = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9898,9 +9186,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; - other.commissioningTimeout = self.commissioningTimeout; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9909,21 +9196,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commissioningTimeout:%@; >", NSStringFromClass([self class]), _commissioningTimeout]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9963,85 +9247,113 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams - (instancetype)init { if (self = [super init]) { + + _groupKeySetIDs = [NSArray array]; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; + other.groupKeySetIDs = self.groupKeySetIDs; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetIDs:%@; >", NSStringFromClass([self class]), _groupKeySetIDs]; return descriptionString; } -@end - -@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } +@end - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &)decodableStruct +{ + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.groupKeySetIDs.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.groupKeySetIDs = array_0; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTROperationalCredentialsClusterAttestationRequestParams +@implementation MTRICDManagementClusterRegisterClientParams - (instancetype)init { if (self = [super init]) { - _attestationNonce = [NSData data]; + _checkInNodeID = @(0); + + _monitoredSubject = @(0); + + _key = [NSData data]; + + _verificationKey = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10050,9 +9362,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + auto other = [[MTRICDManagementClusterRegisterClientParams alloc] init]; - other.attestationNonce = self.attestationNonce; + other.checkInNodeID = self.checkInNodeID; + other.monitoredSubject = self.monitoredSubject; + other.key = self.key; + other.verificationKey = self.verificationKey; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10061,20 +9376,32 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), [_attestationNonce base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; monitoredSubject:%@; key:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, _monitoredSubject, [_key base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAttestationRequestParams (InternalMethods) +@implementation MTRICDManagementClusterRegisterClientParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type encodableStruct; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type encodableStruct; ListFreer listFreer; { - encodableStruct.attestationNonce = AsByteSpan(self.attestationNonce); + encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; + } + { + encodableStruct.monitoredSubject = self.monitoredSubject.unsignedLongLongValue; + } + { + encodableStruct.key = AsByteSpan(self.key); + } + { + if (self.verificationKey != nil) { + auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); + definedValue_0 = AsByteSpan(self.verificationKey); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10115,33 +9442,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterAttestationResponseParams +@implementation MTRICDManagementClusterRegisterClientResponseParams - (instancetype)init { if (self = [super init]) { - _attestationElements = [NSData data]; - - _attestationSignature = [NSData data]; - _timedInvokeTimeoutMs = nil; + _icdCounter = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; + auto other = [[MTRICDManagementClusterRegisterClientResponseParams alloc] init]; - other.attestationElements = self.attestationElements; - other.attestationSignature = self.attestationSignature; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.icdCounter = self.icdCounter; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_attestationElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: icdCounter:%@; >", NSStringFromClass([self class]), _icdCounter]; return descriptionString; } @@ -10152,7 +9474,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType; + using DecodableType = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -10170,79 +9492,6 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r err = chip::app::DataModel::Decode(reader, decodedStruct); if (err == CHIP_NO_ERROR) { err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - do { - // AttestationResponse has an extra attestationChallenge field. Once we - // have some sort of more direct decoding from the responseValue, we can - // probably make this less hardcoded. - // - // It might be simpler to look for the right profile tag in the TLV, but let's stick to examining - // the responseValue we were handed. - id data = responseValue[MTRDataKey]; - if (![data isKindOfClass:NSDictionary.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSDictionary * dataDictionary = data; - if (dataDictionary[MTRTypeKey] == nil || ![dataDictionary[MTRTypeKey] isKindOfClass:NSString.class] || ![dataDictionary[MTRTypeKey] isEqualToString:MTRStructureValueType]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - id value = dataDictionary[MTRValueKey]; - if (value == nil || ![value isKindOfClass:NSArray.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSArray * valueArray = value; - for (id item in valueArray) { - if (![item isKindOfClass:NSDictionary.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSDictionary * itemDictionary = item; - id contextTag = itemDictionary[MTRContextTagKey]; - if (contextTag == nil || ![contextTag isKindOfClass:NSNumber.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSNumber * contextTagNumber = contextTag; - if (![contextTagNumber isEqualToNumber:@(kAttestationChallengeTagValue)]) { - // Not the right field; keep going. - continue; - } - - id data = itemDictionary[MTRDataKey]; - if (data == nil || ![data isKindOfClass:NSDictionary.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSDictionary * dataDictionary = data; - id dataType = dataDictionary[MTRTypeKey]; - id dataValue = dataDictionary[MTRValueKey]; - if (dataType == nil || dataValue == nil || ![dataType isKindOfClass:NSString.class] || ![dataValue isKindOfClass:NSData.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - NSString * dataTypeString = dataType; - if (![dataTypeString isEqualToString:MTROctetStringValueType]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } - - self.attestationChallenge = dataValue; - break; - } - - // Do not add code here without first checking whether err is success. - } while (0); - } if (err == CHIP_NO_ERROR) { return self; } @@ -10260,39 +9509,110 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalCredentialsClusterAttestationResponseParams (InternalMethods) +@implementation MTRICDManagementClusterRegisterClientResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType &)decodableStruct { { - self.attestationElements = AsData(decodableStruct.attestationElements); - } - { - self.attestationSignature = AsData(decodableStruct.attestationSignature); + self.icdCounter = [NSNumber numberWithUnsignedInt:decodableStruct.ICDCounter]; } return CHIP_NO_ERROR; } @end -@implementation MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) +@implementation MTRICDManagementClusterUnregisterClientParams +- (instancetype)init +{ + if (self = [super init]) { -- (void)setSignature:(NSData * _Nonnull)signature + _checkInNodeID = @(0); + + _verificationKey = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; { - self.attestationSignature = signature; + auto other = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + + other.checkInNodeID = self.checkInNodeID; + other.verificationKey = self.verificationKey; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; } -- (NSData * _Nonnull)signature +- (NSString *)description { - return self.attestationSignature; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, [_verificationKey base64EncodedStringWithOptions:0]]; + return descriptionString; } + @end -@implementation MTROperationalCredentialsClusterCertificateChainRequestParams + +@implementation MTRICDManagementClusterUnregisterClientParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; + } + { + if (self.verificationKey != nil) { + auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); + definedValue_0 = AsByteSpan(self.verificationKey); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRICDManagementClusterStayActiveRequestParams - (instancetype)init { if (self = [super init]) { - - _certificateType = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10301,9 +9621,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + auto other = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; - other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10312,21 +9631,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificateType:%@; >", NSStringFromClass([self class]), _certificateType]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterCertificateChainRequestParams (InternalMethods) +@implementation MTRICDManagementClusterStayActiveRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type encodableStruct; + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.certificateType = static_cast>(self.certificateType.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -10366,30 +9682,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterCertificateChainResponseParams +@implementation MTRICDManagementClusterStayActiveResponseParams - (instancetype)init { if (self = [super init]) { - _certificate = [NSData data]; - _timedInvokeTimeoutMs = nil; + _promisedActiveDuration = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; + auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; - other.certificate = self.certificate; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.promisedActiveDuration = self.promisedActiveDuration; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificate:%@; >", NSStringFromClass([self class]), [_certificate base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; return descriptionString; } @@ -10400,7 +9714,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -10435,26 +9749,24 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalCredentialsClusterCertificateChainResponseParams (InternalMethods) +@implementation MTRICDManagementClusterStayActiveResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct { { - self.certificate = AsData(decodableStruct.certificate); + self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; } return CHIP_NO_ERROR; } @end -@implementation MTROperationalCredentialsClusterCSRRequestParams +@implementation MTRTimerClusterSetTimerParams - (instancetype)init { if (self = [super init]) { - _csrNonce = [NSData data]; - - _isForUpdateNOC = nil; + _newTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10463,10 +9775,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + auto other = [[MTRTimerClusterSetTimerParams alloc] init]; - other.csrNonce = self.csrNonce; - other.isForUpdateNOC = self.isForUpdateNOC; + other.newTime = self.newTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10475,26 +9786,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: csrNonce:%@; isForUpdateNOC:%@; >", NSStringFromClass([self class]), [_csrNonce base64EncodedStringWithOptions:0], _isForUpdateNOC]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newTime:%@; >", NSStringFromClass([self class]), _newTime]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterCSRRequestParams (InternalMethods) +@implementation MTRTimerClusterSetTimerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type encodableStruct; + chip::app::Clusters::Timer::Commands::SetTimer::Type encodableStruct; ListFreer listFreer; { - encodableStruct.CSRNonce = AsByteSpan(self.csrNonce); - } - { - if (self.isForUpdateNOC != nil) { - auto & definedValue_0 = encodableStruct.isForUpdateNOC.Emplace(); - definedValue_0 = self.isForUpdateNOC.boolValue; - } + encodableStruct.newTime = self.newTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10535,107 +9840,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterCSRResponseParams +@implementation MTRTimerClusterResetTimerParams - (instancetype)init { if (self = [super init]) { - - _nocsrElements = [NSData data]; - - _attestationSignature = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; + auto other = [[MTRTimerClusterResetTimerParams alloc] init]; - other.nocsrElements = self.nocsrElements; - other.attestationSignature = self.attestationSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocsrElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_nocsrElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRTimerClusterResetTimerParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::Timer::Commands::ResetTimer::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTROperationalCredentialsClusterCSRResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.nocsrElements = AsData(decodableStruct.NOCSRElements); + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - self.attestationSignature = AsData(decodableStruct.attestationSignature); + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTROperationalCredentialsClusterAddNOCParams +@implementation MTRTimerClusterAddTimeParams - (instancetype)init { if (self = [super init]) { - _nocValue = [NSData data]; - - _icacValue = nil; - - _ipkValue = [NSData data]; - - _caseAdminSubject = @(0); - - _adminVendorId = @(0); + _additionalTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10644,13 +9927,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + auto other = [[MTRTimerClusterAddTimeParams alloc] init]; - other.nocValue = self.nocValue; - other.icacValue = self.icacValue; - other.ipkValue = self.ipkValue; - other.caseAdminSubject = self.caseAdminSubject; - other.adminVendorId = self.adminVendorId; + other.additionalTime = self.additionalTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10659,35 +9938,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocValue:%@; icacValue:%@; ipkValue:%@; caseAdminSubject:%@; adminVendorId:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0], [_ipkValue base64EncodedStringWithOptions:0], _caseAdminSubject, _adminVendorId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: additionalTime:%@; >", NSStringFromClass([self class]), _additionalTime]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAddNOCParams (InternalMethods) +@implementation MTRTimerClusterAddTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type encodableStruct; + chip::app::Clusters::Timer::Commands::AddTime::Type encodableStruct; ListFreer listFreer; { - encodableStruct.NOCValue = AsByteSpan(self.nocValue); - } - { - if (self.icacValue != nil) { - auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); - definedValue_0 = AsByteSpan(self.icacValue); - } - } - { - encodableStruct.IPKValue = AsByteSpan(self.ipkValue); - } - { - encodableStruct.caseAdminSubject = self.caseAdminSubject.unsignedLongLongValue; - } - { - encodableStruct.adminVendorId = static_cast>(self.adminVendorId.unsignedShortValue); + encodableStruct.additionalTime = self.additionalTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10728,14 +9992,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterUpdateNOCParams +@implementation MTRTimerClusterReduceTimeParams - (instancetype)init { if (self = [super init]) { - _nocValue = [NSData data]; - - _icacValue = nil; + _timeReduction = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10744,10 +10006,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + auto other = [[MTRTimerClusterReduceTimeParams alloc] init]; - other.nocValue = self.nocValue; - other.icacValue = self.icacValue; + other.timeReduction = self.timeReduction; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10756,26 +10017,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocValue:%@; icacValue:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeReduction:%@; >", NSStringFromClass([self class]), _timeReduction]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterUpdateNOCParams (InternalMethods) +@implementation MTRTimerClusterReduceTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type encodableStruct; + chip::app::Clusters::Timer::Commands::ReduceTime::Type encodableStruct; ListFreer listFreer; { - encodableStruct.NOCValue = AsByteSpan(self.nocValue); - } - { - if (self.icacValue != nil) { - auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); - definedValue_0 = AsByteSpan(self.icacValue); - } + encodableStruct.timeReduction = self.timeReduction.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10816,117 +10071,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterNOCResponseParams +@implementation MTROvenCavityOperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _statusCode = @(0); - - _fabricIndex = nil; - - _debugText = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - other.statusCode = self.statusCode; - other.fabricIndex = self.fabricIndex; - other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", NSStringFromClass([self class]), _statusCode, _fabricIndex, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTROperationalCredentialsClusterNOCResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.statusCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.statusCode)]; - } - { - if (decodableStruct.fabricIndex.HasValue()) { - self.fabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.fabricIndex.Value()]; - } else { - self.fabricIndex = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.debugText.HasValue()) { - self.debugText = AsString(decodableStruct.debugText.Value()); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.debugText = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams +@implementation MTROvenCavityOperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { - - _label = @""; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10935,9 +10156,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; - other.label = self.label; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10946,21 +10166,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.label = AsCharSpan(self.label); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -11000,12 +10217,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterRemoveFabricParams +@implementation MTROvenCavityOperationalStateClusterStartParams - (instancetype)init { if (self = [super init]) { - - _fabricIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11014,9 +10229,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; - other.fabricIndex = self.fabricIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11025,21 +10239,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterRemoveFabricParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterStartParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.fabricIndex = self.fabricIndex.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -11079,12 +10290,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams +@implementation MTROvenCavityOperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11093,9 +10302,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11104,21 +10312,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCACertificate:%@; >", NSStringFromClass([self class]), [_rootCACertificate base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.rootCACertificate = AsByteSpan(self.rootCACertificate); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -11158,140 +10363,110 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) - -- (void)setRootCertificate:(NSData * _Nonnull)rootCertificate -{ - self.rootCACertificate = rootCertificate; -} - -- (NSData * _Nonnull)rootCertificate -{ - return self.rootCACertificate; -} -@end -@implementation MTRGroupKeyManagementClusterKeySetWriteParams +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterOperationalCommandResponseParams alloc] init]; - other.groupKeySet = self.groupKeySet; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.commandResponseState = self.commandResponseState; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; return descriptionString; } -@end - -@implementation MTRGroupKeyManagementClusterKeySetWriteParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.groupKeySet.groupKeySetID = self.groupKeySet.groupKeySetID.unsignedShortValue; - encodableStruct.groupKeySet.groupKeySecurityPolicy = static_cast>(self.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (self.groupKeySet.epochKey0 == nil) { - encodableStruct.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey0); - } - if (self.groupKeySet.epochStartTime0 == nil) { - encodableStruct.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = self.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (self.groupKeySet.epochKey1 == nil) { - encodableStruct.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey1); - } - if (self.groupKeySet.epochStartTime1 == nil) { - encodableStruct.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = self.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (self.groupKeySet.epochKey2 == nil) { - encodableStruct.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = AsByteSpan(self.groupKeySet.epochKey2); - } - if (self.groupKeySet.epochStartTime2 == nil) { - encodableStruct.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = self.groupKeySet.epochStartTime2.unsignedLongLongValue; - } + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; + self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; + if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { + self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); + if (self.commandResponseState.errorStateLabel == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.commandResponseState.errorStateLabel = nil; } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { + self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); + if (self.commandResponseState.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.commandResponseState.errorStateDetails = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRGroupKeyManagementClusterKeySetReadParams +@implementation MTROvenModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _groupKeySetID = @(0); + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11300,9 +10475,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; - other.groupKeySetID = self.groupKeySetID; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11311,20 +10486,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRGroupKeyManagementClusterKeySetReadParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type encodableStruct; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11365,30 +10540,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams +@implementation MTROvenModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - _timedInvokeTimeoutMs = nil; + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeResponseParams alloc] init]; - other.groupKeySet = self.groupKeySet; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -11399,7 +10575,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; + using DecodableType = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -11434,43 +10610,22 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - self.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - self.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:decodableStruct.groupKeySet.groupKeySetID]; - self.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.groupKeySet.groupKeySecurityPolicy)]; - if (decodableStruct.groupKeySet.epochKey0.IsNull()) { - self.groupKeySet.epochKey0 = nil; - } else { - self.groupKeySet.epochKey0 = AsData(decodableStruct.groupKeySet.epochKey0.Value()); - } - if (decodableStruct.groupKeySet.epochStartTime0.IsNull()) { - self.groupKeySet.epochStartTime0 = nil; - } else { - self.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime0.Value()]; - } - if (decodableStruct.groupKeySet.epochKey1.IsNull()) { - self.groupKeySet.epochKey1 = nil; - } else { - self.groupKeySet.epochKey1 = AsData(decodableStruct.groupKeySet.epochKey1.Value()); - } - if (decodableStruct.groupKeySet.epochStartTime1.IsNull()) { - self.groupKeySet.epochStartTime1 = nil; - } else { - self.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime1.Value()]; - } - if (decodableStruct.groupKeySet.epochKey2.IsNull()) { - self.groupKeySet.epochKey2 = nil; - } else { - self.groupKeySet.epochKey2 = AsData(decodableStruct.groupKeySet.epochKey2.Value()); - } - if (decodableStruct.groupKeySet.epochStartTime2.IsNull()) { - self.groupKeySet.epochStartTime2 = nil; + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } } else { - self.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime2.Value()]; + self.statusText = nil; } } return CHIP_NO_ERROR; @@ -11478,12 +10633,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKey @end -@implementation MTRGroupKeyManagementClusterKeySetRemoveParams +@implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _groupKeySetID = @(0); + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11492,9 +10647,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - other.groupKeySetID = self.groupKeySetID; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11503,20 +10658,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRGroupKeyManagementClusterKeySetRemoveParams (InternalMethods) +@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type encodableStruct; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11557,10 +10712,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams +@implementation MTRLaundryWasherModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { + + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11569,8 +10726,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + auto other = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11579,18 +10737,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams (InternalMethods) +@implementation MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type encodableStruct; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.newMode = self.newMode.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -11630,30 +10791,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams +@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _groupKeySetIDs = [NSArray array]; - _timedInvokeTimeoutMs = nil; + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams alloc] init]; + auto other = [[MTRLaundryWasherModeClusterChangeToModeResponseParams alloc] init]; - other.groupKeySetIDs = self.groupKeySetIDs; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetIDs:%@; >", NSStringFromClass([self class]), _groupKeySetIDs]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -11664,7 +10826,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + using DecodableType = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -11699,25 +10861,22 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams (InternalMethods) +@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.groupKeySetIDs.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } - self.groupKeySetIDs = array_0; + } else { + self.statusText = nil; } } return CHIP_NO_ERROR; @@ -11725,18 +10884,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKey @end -@implementation MTRICDManagementClusterRegisterClientParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _checkInNodeID = @(0); - - _monitoredSubject = @(0); - - _key = [NSData data]; - - _verificationKey = nil; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11745,12 +10898,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; - other.checkInNodeID = self.checkInNodeID; - other.monitoredSubject = self.monitoredSubject; - other.key = self.key; - other.verificationKey = self.verificationKey; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11759,32 +10909,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; monitoredSubject:%@; key:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, _monitoredSubject, [_key base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRICDManagementClusterRegisterClientParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type encodableStruct; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; - } - { - encodableStruct.monitoredSubject = self.monitoredSubject.unsignedLongLongValue; - } - { - encodableStruct.key = AsByteSpan(self.key); - } - { - if (self.verificationKey != nil) { - auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); - definedValue_0 = AsByteSpan(self.verificationKey); - } + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11825,28 +10963,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRICDManagementClusterRegisterClientResponseParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _icdCounter = @(0); + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterRegisterClientResponseParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams alloc] init]; - other.icdCounter = self.icdCounter; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: icdCounter:%@; >", NSStringFromClass([self class]), _icdCounter]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -11857,7 +10998,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; + using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -11892,26 +11033,35 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRICDManagementClusterRegisterClientResponseParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - self.icdCounter = [NSNumber numberWithUnsignedInt:decodableStruct.ICDCounter]; + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; + } } return CHIP_NO_ERROR; } @end -@implementation MTRICDManagementClusterUnregisterClientParams +@implementation MTRRVCRunModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _checkInNodeID = @(0); - - _verificationKey = nil; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11920,10 +11070,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; - other.checkInNodeID = self.checkInNodeID; - other.verificationKey = self.verificationKey; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11932,26 +11081,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, [_verificationKey base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRICDManagementClusterUnregisterClientParams (InternalMethods) +@implementation MTRRVCRunModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type encodableStruct; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; - } - { - if (self.verificationKey != nil) { - auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); - definedValue_0 = AsByteSpan(self.verificationKey); - } + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11982,20 +11125,115 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader return nil; } - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRRVCRunModeClusterChangeToModeResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _statusText = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRRVCRunModeClusterChangeToModeResponseParams alloc] init]; + + other.status = self.status; + other.statusText = self.statusText; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRRVCRunModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRICDManagementClusterStayActiveRequestParams +@implementation MTRRVCCleanModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { + + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12004,8 +11242,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; + auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12014,18 +11253,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRICDManagementClusterStayActiveRequestParams (InternalMethods) +@implementation MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type encodableStruct; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.newMode = self.newMode.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12065,28 +11307,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRICDManagementClusterStayActiveResponseParams +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _promisedActiveDuration = @(0); + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; + auto other = [[MTRRVCCleanModeClusterChangeToModeResponseParams alloc] init]; - other.promisedActiveDuration = self.promisedActiveDuration; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -12097,7 +11342,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; + using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -12132,24 +11377,37 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRICDManagementClusterStayActiveResponseParams (InternalMethods) +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; + } } return CHIP_NO_ERROR; } @end -@implementation MTRTimerClusterSetTimerParams +@implementation MTRTemperatureControlClusterSetTemperatureParams - (instancetype)init { if (self = [super init]) { - _newTime = @(0); + _targetTemperature = nil; + + _targetTemperatureLevel = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12158,9 +11416,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterSetTimerParams alloc] init]; + auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - other.newTime = self.newTime; + other.targetTemperature = self.targetTemperature; + other.targetTemperatureLevel = self.targetTemperatureLevel; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12169,20 +11428,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newTime:%@; >", NSStringFromClass([self class]), _newTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; return descriptionString; } @end -@implementation MTRTimerClusterSetTimerParams (InternalMethods) +@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::SetTimer::Type encodableStruct; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newTime = self.newTime.unsignedIntValue; + if (self.targetTemperature != nil) { + auto & definedValue_0 = encodableStruct.targetTemperature.Emplace(); + definedValue_0 = self.targetTemperature.shortValue; + } + } + { + if (self.targetTemperatureLevel != nil) { + auto & definedValue_0 = encodableStruct.targetTemperatureLevel.Emplace(); + definedValue_0 = self.targetTemperatureLevel.unsignedCharValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12223,10 +11491,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimerClusterResetTimerParams +@implementation MTRDishwasherModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { + + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12235,8 +11505,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterResetTimerParams alloc] init]; + auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12245,18 +11516,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRTimerClusterResetTimerParams (InternalMethods) +@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::ResetTimer::Type encodableStruct; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.newMode = self.newMode.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12296,91 +11570,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimerClusterAddTimeParams +@implementation MTRDishwasherModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _additionalTime = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterAddTimeParams alloc] init]; + auto other = [[MTRDishwasherModeClusterChangeToModeResponseParams alloc] init]; - other.additionalTime = self.additionalTime; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: additionalTime:%@; >", NSStringFromClass([self class]), _additionalTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } -@end - -@implementation MTRTimerClusterAddTimeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Timer::Commands::AddTime::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.additionalTime = self.additionalTime.unsignedIntValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRTimerClusterReduceTimeParams +@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams - (instancetype)init { if (self = [super init]) { - - _timeReduction = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12389,9 +11675,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterReduceTimeParams alloc] init]; + auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; - other.timeReduction = self.timeReduction; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12400,21 +11685,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeReduction:%@; >", NSStringFromClass([self class]), _timeReduction]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRTimerClusterReduceTimeParams (InternalMethods) +@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::ReduceTime::Type encodableStruct; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.timeReduction = self.timeReduction.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12454,10 +11736,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterPauseParams +@implementation MTRDishwasherAlarmClusterResetParams - (instancetype)init { if (self = [super init]) { + + _alarms = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12466,8 +11750,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + other.alarms = self.alarms; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12476,18 +11761,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; return descriptionString; } @end -@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) +@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type encodableStruct; + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.alarms = static_cast>(self.alarms.unsignedIntValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12527,10 +11815,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterStopParams +@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams - (instancetype)init { if (self = [super init]) { + + _mask = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12539,8 +11829,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; + auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + other.mask = self.mask; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12549,18 +11840,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; return descriptionString; } @end -@implementation MTROvenCavityOperationalStateClusterStopParams (InternalMethods) +@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type encodableStruct; + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.mask = static_cast>(self.mask.unsignedIntValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12600,10 +11894,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterStartParams +@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams - (instancetype)init { if (self = [super init]) { + + _cookMode = nil; + + _cookTime = nil; + + _powerSetting = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12612,8 +11912,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; + auto other = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; + other.cookMode = self.cookMode; + other.cookTime = self.cookTime; + other.powerSetting = self.powerSetting; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12622,18 +11925,36 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: cookMode:%@; cookTime:%@; powerSetting:%@; >", NSStringFromClass([self class]), _cookMode, _cookTime, _powerSetting]; return descriptionString; } @end -@implementation MTROvenCavityOperationalStateClusterStartParams (InternalMethods) +@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type encodableStruct; + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type encodableStruct; ListFreer listFreer; + { + if (self.cookMode != nil) { + auto & definedValue_0 = encodableStruct.cookMode.Emplace(); + definedValue_0 = self.cookMode.unsignedCharValue; + } + } + { + if (self.cookTime != nil) { + auto & definedValue_0 = encodableStruct.cookTime.Emplace(); + definedValue_0 = self.cookTime.unsignedIntValue; + } + } + { + if (self.powerSetting != nil) { + auto & definedValue_0 = encodableStruct.powerSetting.Emplace(); + definedValue_0 = self.powerSetting.unsignedCharValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12673,10 +11994,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterResumeParams +@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams - (instancetype)init { if (self = [super init]) { + + _timeToAdd = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12685,8 +12008,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; + other.timeToAdd = self.timeToAdd; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12695,18 +12019,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeToAdd:%@; >", NSStringFromClass([self class]), _timeToAdd]; return descriptionString; } @end -@implementation MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) +@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.timeToAdd = self.timeToAdd.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12746,110 +12073,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROvenCavityOperationalStateClusterOperationalCommandResponseParams alloc] init]; - - other.commandResponseState = self.commandResponseState; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct -{ - { - self.commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; - self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; - if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { - self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); - if (self.commandResponseState.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateLabel = nil; - } - if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { - self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); - if (self.commandResponseState.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateDetails = nil; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTROvenModeClusterChangeToModeParams +@implementation MTROperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12858,9 +12085,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; + auto other = [[MTROperationalStateClusterPauseParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12869,21 +12095,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROvenModeClusterChangeToModeParams (InternalMethods) +@implementation MTROperationalStateClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Pause::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12923,105 +12146,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenModeClusterChangeToModeResponseParams +@implementation MTROperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _statusText = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTROperationalStateClusterStopParams alloc] init]; - other.status = self.status; - other.statusText = self.statusText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROperationalStateClusterStopParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::OperationalState::Commands::Stop::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -@end + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.statusText = nil; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - return CHIP_NO_ERROR; -} + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} @end -@implementation MTRModeSelectClusterChangeToModeParams +@implementation MTROperationalStateClusterStartParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13030,9 +12231,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + auto other = [[MTROperationalStateClusterStartParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13041,21 +12241,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) +@implementation MTROperationalStateClusterStartParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Start::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -13095,12 +12292,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLaundryWasherModeClusterChangeToModeParams +@implementation MTROperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13109,9 +12304,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + auto other = [[MTROperationalStateClusterResumeParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13120,21 +12314,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) +@implementation MTROperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Resume::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -13174,31 +12365,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams +@implementation MTROperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _statusText = nil; + _commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLaundryWasherModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTROperationalStateClusterOperationalCommandResponseParams alloc] init]; - other.status = self.status; - other.statusText = self.statusText; + other.commandResponseState = self.commandResponseState; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; return descriptionString; } @@ -13209,7 +12397,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13244,22 +12432,30 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct { { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { + self.commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; + self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; + if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { + self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); + if (self.commandResponseState.errorStateLabel == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } } else { - self.statusText = nil; + self.commandResponseState.errorStateLabel = nil; + } + if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { + self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); + if (self.commandResponseState.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.commandResponseState.errorStateDetails = nil; } } return CHIP_NO_ERROR; @@ -13267,12 +12463,10 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryW @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams +@implementation MTRRVCOperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13281,9 +12475,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13292,21 +12485,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::RvcOperationalState::Commands::Pause::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -13346,105 +12536,156 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams +@implementation MTRRVCOperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _statusText = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterStopParams alloc] init]; - other.status = self.status; - other.statusText = self.statusText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRRVCOperationalStateClusterStopParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::RvcOperationalState::Commands::Stop::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { - return nil; + return CHIP_ERROR_NO_MEMORY; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } } - return nil; + return decodedObj; +} +@end + +@implementation MTRRVCOperationalStateClusterStartParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRRVCOperationalStateClusterStartParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterStartParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + chip::app::Clusters::RvcOperationalState::Commands::Start::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.statusText = nil; + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRRVCRunModeClusterChangeToModeParams +@implementation MTRRVCOperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13453,9 +12694,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13464,21 +12704,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRRVCRunModeClusterChangeToModeParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::RvcOperationalState::Commands::Resume::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newMode = self.newMode.unsignedCharValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -13518,31 +12755,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams +@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _statusText = nil; + _commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterOperationalCommandResponseParams alloc] init]; - other.status = self.status; - other.statusText = self.statusText; + other.commandResponseState = self.commandResponseState; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; return descriptionString; } @@ -13553,7 +12787,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13588,22 +12822,30 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct { { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { + self.commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; + self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; + if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { + self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); + if (self.commandResponseState.errorStateLabel == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } } else { - self.statusText = nil; + self.commandResponseState.errorStateLabel = nil; + } + if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { + self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); + if (self.commandResponseState.errorStateDetails == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.commandResponseState.errorStateDetails = nil; } } return CHIP_NO_ERROR; @@ -13611,12 +12853,20 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMo @end -@implementation MTRRVCCleanModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterAddSceneParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = @(0); + + _sceneName = @""; + + _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13625,9 +12875,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRScenesManagementClusterAddSceneParams alloc] init]; - other.newMode = self.newMode; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13636,20 +12890,76 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @end -@implementation MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterAddSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::AddScene::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newMode = self.newMode.unsignedCharValue; + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.sceneName = AsCharSpan(self.sceneName); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.extensionFieldSets.count != 0) { + auto * listHolder_0 = new ListHolder(self.extensionFieldSets.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.extensionFieldSets.count; ++i_0) { + if (![self.extensionFieldSets[i_0] isKindOfClass:[MTRScenesManagementClusterExtensionFieldSet class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRScenesManagementClusterExtensionFieldSet *) self.extensionFieldSets[i_0]; + listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.attributeValueList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { + if (![element_0.attributeValueList[i_2] isKindOfClass:[MTRScenesManagementClusterAttributeValuePair class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRScenesManagementClusterAttributeValuePair *) element_0.attributeValueList[i_2]; + listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; + listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; + } + listHolder_0->mList[i_0].attributeValueList = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); + } else { + listHolder_0->mList[i_0].attributeValueList = ListType_2(); + } + } + } + encodableStruct.extensionFieldSets = ListType_0(listHolder_0->mList, self.extensionFieldSets.count); + } else { + encodableStruct.extensionFieldSets = ListType_0(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13690,31 +13000,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams +@implementation MTRScenesManagementClusterAddSceneResponseParams - (instancetype)init { if (self = [super init]) { _status = @(0); - _statusText = nil; + _groupID = @(0); + + _sceneID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterAddSceneResponseParams alloc] init]; other.status = self.status; - other.statusText = self.statusText; + other.groupID = self.groupID; + other.sceneID = self.sceneID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } @@ -13725,7 +13038,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13760,126 +13073,32 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterAddSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.statusText = nil; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRTemperatureControlClusterSetTemperatureParams -- (instancetype)init -{ - if (self = [super init]) { - - _targetTemperature = nil; - - _targetTemperatureLevel = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - - other.targetTemperature = self.targetTemperature; - other.targetTemperatureLevel = self.targetTemperatureLevel; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; - return descriptionString; -} - -@end - -@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; - ListFreer listFreer; - { - if (self.targetTemperature != nil) { - auto & definedValue_0 = encodableStruct.targetTemperature.Emplace(); - definedValue_0 = self.targetTemperature.shortValue; - } + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; } { - if (self.targetTemperatureLevel != nil) { - auto & definedValue_0 = encodableStruct.targetTemperatureLevel.Emplace(); - definedValue_0 = self.targetTemperatureLevel.unsignedCharValue; - } - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + return CHIP_NO_ERROR; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} @end -@implementation MTRDishwasherModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterViewSceneParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13888,9 +13107,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRScenesManagementClusterViewSceneParams alloc] init]; - other.newMode = self.newMode; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13899,20 +13119,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } @end -@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterViewSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newMode = self.newMode.unsignedCharValue; + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13953,31 +13176,43 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams +@implementation MTRScenesManagementClusterViewSceneResponseParams - (instancetype)init { if (self = [super init]) { _status = @(0); - _statusText = nil; + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = nil; + + _sceneName = nil; + + _extensionFieldSets = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterViewSceneResponseParams alloc] init]; other.status = self.status; - other.statusText = self.statusText; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @@ -13988,7 +13223,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -14023,22 +13258,74 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterViewSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } { - if (decodableStruct.statusText.HasValue()) { - self.statusText = AsString(decodableStruct.statusText.Value()); - if (self.statusText == nil) { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + { + if (decodableStruct.transitionTime.HasValue()) { + self.transitionTime = [NSNumber numberWithUnsignedShort:decodableStruct.transitionTime.Value()]; + } else { + self.transitionTime = nil; + } + } + { + if (decodableStruct.sceneName.HasValue()) { + self.sceneName = AsString(decodableStruct.sceneName.Value()); + if (self.sceneName == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; return err; } } else { - self.statusText = nil; + self.sceneName = nil; + } + } + { + if (decodableStruct.extensionFieldSets.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.extensionFieldSets.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRScenesManagementClusterExtensionFieldSet * newElement_1; + newElement_1 = [MTRScenesManagementClusterExtensionFieldSet new]; + newElement_1.clusterID = [NSNumber numberWithUnsignedInt:entry_1.clusterID]; + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_1.attributeValueList.begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRScenesManagementClusterAttributeValuePair * newElement_3; + newElement_3 = [MTRScenesManagementClusterAttributeValuePair new]; + newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID]; + newElement_3.attributeValue = [NSNumber numberWithUnsignedInt:entry_3.attributeValue]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_1.attributeValueList = array_3; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.extensionFieldSets = array_1; + } + } else { + self.extensionFieldSets = nil; } } return CHIP_NO_ERROR; @@ -14046,85 +13333,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Dishwash @end -@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams +@implementation MTRScenesManagementClusterRemoveSceneParams - (instancetype)init { if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRDishwasherAlarmClusterResetParams -- (instancetype)init -{ - if (self = [super init]) { + _groupID = @(0); - _alarms = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14133,9 +13349,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; - other.alarms = self.alarms; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14144,20 +13361,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } @end -@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Type encodableStruct; ListFreer listFreer; { - encodableStruct.alarms = static_cast>(self.alarms.unsignedIntValue); + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14198,95 +13418,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams +@implementation MTRScenesManagementClusterRemoveSceneResponseParams - (instancetype)init { if (self = [super init]) { - _mask = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _status = @(0); + + _groupID = @(0); + + _sceneID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveSceneResponseParams alloc] init]; - other.mask = self.mask; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.groupID = self.groupID; + other.sceneID = self.sceneID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } -@end - -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.mask = static_cast>(self.mask.unsignedIntValue); + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } } - return nil; } - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRScenesManagementClusterRemoveSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } - return decodedObj; + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + return CHIP_NO_ERROR; } + @end -@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams +@implementation MTRScenesManagementClusterRemoveAllScenesParams - (instancetype)init { if (self = [super init]) { - _cookMode = nil; - - _cookTime = nil; - - _powerSetting = nil; + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14295,11 +13523,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; - other.cookMode = self.cookMode; - other.cookTime = self.cookTime; - other.powerSetting = self.powerSetting; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14308,35 +13534,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: cookMode:%@; cookTime:%@; powerSetting:%@; >", NSStringFromClass([self class]), _cookMode, _cookTime, _powerSetting]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } @end -@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveAllScenesParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type encodableStruct; ListFreer listFreer; { - if (self.cookMode != nil) { - auto & definedValue_0 = encodableStruct.cookMode.Emplace(); - definedValue_0 = self.cookMode.unsignedCharValue; - } - } - { - if (self.cookTime != nil) { - auto & definedValue_0 = encodableStruct.cookTime.Emplace(); - definedValue_0 = self.cookTime.unsignedIntValue; - } - } - { - if (self.powerSetting != nil) { - auto & definedValue_0 = encodableStruct.powerSetting.Emplace(); - definedValue_0 = self.powerSetting.unsignedCharValue; - } + encodableStruct.groupID = self.groupID.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14377,89 +13588,99 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams +@implementation MTRScenesManagementClusterRemoveAllScenesResponseParams - (instancetype)init { if (self = [super init]) { - _timeToAdd = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _status = @(0); + + _groupID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveAllScenesResponseParams alloc] init]; - other.timeToAdd = self.timeToAdd; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.groupID = self.groupID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeToAdd:%@; >", NSStringFromClass([self class]), _timeToAdd]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; return descriptionString; } -@end - -@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.timeToAdd = self.timeToAdd.unsignedIntValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRScenesManagementClusterRemoveAllScenesResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTROperationalStateClusterPauseParams +@implementation MTRScenesManagementClusterStoreSceneParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14468,8 +13689,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14478,18 +13701,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } @end -@implementation MTROperationalStateClusterPauseParams (InternalMethods) +@implementation MTRScenesManagementClusterStoreSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalState::Commands::Pause::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -14529,83 +13758,107 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterStopParams +@implementation MTRScenesManagementClusterStoreSceneResponseParams - (instancetype)init { if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + + _status = @(0); + + _groupID = @(0); + + _sceneID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterStopParams alloc] init]; + auto other = [[MTRScenesManagementClusterStoreSceneResponseParams alloc] init]; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.groupID = self.groupID; + other.sceneID = self.sceneID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } -@end - -@implementation MTROperationalStateClusterStopParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::OperationalState::Commands::Stop::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRScenesManagementClusterStoreSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; } - return decodedObj; + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + return CHIP_NO_ERROR; } + @end -@implementation MTROperationalStateClusterStartParams +@implementation MTRScenesManagementClusterRecallSceneParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14614,8 +13867,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterStartParams alloc] init]; + auto other = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14624,18 +13880,35 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime]; return descriptionString; } @end -@implementation MTROperationalStateClusterStartParams (InternalMethods) +@implementation MTRScenesManagementClusterRecallSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalState::Commands::Start::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; + } + { + if (self.transitionTime != nil) { + auto & definedValue_0 = encodableStruct.transitionTime.Emplace(); + if (self.transitionTime == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.transitionTime.unsignedShortValue; + } + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -14675,10 +13948,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterResumeParams +@implementation MTRScenesManagementClusterGetSceneMembershipParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14687,8 +13962,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14697,18 +13973,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } @end -@implementation MTROperationalStateClusterResumeParams (InternalMethods) +@implementation MTRScenesManagementClusterGetSceneMembershipParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupID = self.groupID.unsignedShortValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -14748,28 +14027,37 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterOperationalCommandResponseParams +@implementation MTRScenesManagementClusterGetSceneMembershipResponseParams - (instancetype)init { if (self = [super init]) { - _commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; + _status = @(0); + + _capacity = nil; + + _groupID = @(0); + + _sceneList = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterOperationalCommandResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterGetSceneMembershipResponseParams alloc] init]; - other.commandResponseState = self.commandResponseState; + other.status = self.status; + other.capacity = self.capacity; + other.groupID = self.groupID; + other.sceneList = self.sceneList; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupID:%@; sceneList:%@; >", NSStringFromClass([self class]), _status, _capacity, _groupID, _sceneList]; return descriptionString; } @@ -14780,7 +14068,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -14815,30 +14103,42 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterGetSceneMembershipResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType &)decodableStruct { { - self.commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; - self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; - if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { - self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); - if (self.commandResponseState.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.capacity.IsNull()) { + self.capacity = nil; } else { - self.commandResponseState.errorStateLabel = nil; + self.capacity = [NSNumber numberWithUnsignedChar:decodableStruct.capacity.Value()]; } - if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { - self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); - if (self.commandResponseState.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + if (decodableStruct.sceneList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.sceneList.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:entry_1]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.sceneList = array_1; } } else { - self.commandResponseState.errorStateDetails = nil; + self.sceneList = nil; } } return CHIP_NO_ERROR; @@ -14846,10 +14146,20 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Operatio @end -@implementation MTRRVCOperationalStateClusterPauseParams +@implementation MTRScenesManagementClusterEnhancedAddSceneParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = @(0); + + _sceneName = @""; + + _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14858,8 +14168,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedAddSceneParams alloc] init]; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14868,18 +14183,77 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @end -@implementation MTRRVCOperationalStateClusterPauseParams (InternalMethods) +@implementation MTRScenesManagementClusterEnhancedAddSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Pause::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; + } + { + encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; + } + { + encodableStruct.sceneName = AsCharSpan(self.sceneName); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.extensionFieldSets.count != 0) { + auto * listHolder_0 = new ListHolder(self.extensionFieldSets.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.extensionFieldSets.count; ++i_0) { + if (![self.extensionFieldSets[i_0] isKindOfClass:[MTRScenesManagementClusterExtensionFieldSet class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRScenesManagementClusterExtensionFieldSet *) self.extensionFieldSets[i_0]; + listHolder_0->mList[i_0].clusterID = element_0.clusterID.unsignedIntValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].attributeValueList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.attributeValueList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.attributeValueList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.attributeValueList.count; ++i_2) { + if (![element_0.attributeValueList[i_2] isKindOfClass:[MTRScenesManagementClusterAttributeValuePair class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRScenesManagementClusterAttributeValuePair *) element_0.attributeValueList[i_2]; + listHolder_2->mList[i_2].attributeID = element_2.attributeID.unsignedIntValue; + listHolder_2->mList[i_2].attributeValue = element_2.attributeValue.unsignedIntValue; + } + listHolder_0->mList[i_0].attributeValueList = ListType_2(listHolder_2->mList, element_0.attributeValueList.count); + } else { + listHolder_0->mList[i_0].attributeValueList = ListType_2(); + } + } + } + encodableStruct.extensionFieldSets = ListType_0(listHolder_0->mList, self.extensionFieldSets.count); + } else { + encodableStruct.extensionFieldSets = ListType_0(); + } + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -14915,14 +14289,109 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return decodedObj; + return decodedObj; +} +@end + +@implementation MTRScenesManagementClusterEnhancedAddSceneResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _groupID = @(0); + + _sceneID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRScenesManagementClusterEnhancedAddSceneResponseParams alloc] init]; + + other.status = self.status; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRScenesManagementClusterEnhancedAddSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + return CHIP_NO_ERROR; } + @end -@implementation MTRRVCOperationalStateClusterStopParams +@implementation MTRScenesManagementClusterEnhancedViewSceneParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14931,8 +14400,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterStopParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14941,18 +14412,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } @end -@implementation MTRRVCOperationalStateClusterStopParams (InternalMethods) +@implementation MTRScenesManagementClusterEnhancedViewSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupID = self.groupID.unsignedShortValue; + } + { + encodableStruct.sceneID = self.sceneID.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -14992,83 +14469,177 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterStartParams +@implementation MTRScenesManagementClusterEnhancedViewSceneResponseParams - (instancetype)init { if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + + _status = @(0); + + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = nil; + + _sceneName = nil; + + _extensionFieldSets = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterStartParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedViewSceneResponseParams alloc] init]; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; + other.sceneName = self.sceneName; + other.extensionFieldSets = self.extensionFieldSets; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } -@end - -@implementation MTRRVCOperationalStateClusterStartParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::RvcOperationalState::Commands::Start::Type encodableStruct; - ListFreer listFreer; + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + return nil; } - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - ReturnErrorOnFailure(writer.Finalize(&buffer)); + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@end + +@implementation MTRScenesManagementClusterEnhancedViewSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType &)decodableStruct { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + { + if (decodableStruct.transitionTime.HasValue()) { + self.transitionTime = [NSNumber numberWithUnsignedShort:decodableStruct.transitionTime.Value()]; + } else { + self.transitionTime = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.sceneName.HasValue()) { + self.sceneName = AsString(decodableStruct.sceneName.Value()); + if (self.sceneName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.sceneName = nil; } } - return decodedObj; + { + if (decodableStruct.extensionFieldSets.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.extensionFieldSets.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRScenesManagementClusterExtensionFieldSet * newElement_1; + newElement_1 = [MTRScenesManagementClusterExtensionFieldSet new]; + newElement_1.clusterID = [NSNumber numberWithUnsignedInt:entry_1.clusterID]; + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_1.attributeValueList.begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRScenesManagementClusterAttributeValuePair * newElement_3; + newElement_3 = [MTRScenesManagementClusterAttributeValuePair new]; + newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID]; + newElement_3.attributeValue = [NSNumber numberWithUnsignedInt:entry_3.attributeValue]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_1.attributeValueList = array_3; + } + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.extensionFieldSets = array_1; + } + } else { + self.extensionFieldSets = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRRVCOperationalStateClusterResumeParams +@implementation MTRScenesManagementClusterCopySceneParams - (instancetype)init { if (self = [super init]) { + + _mode = @(0); + + _groupIdentifierFrom = @(0); + + _sceneIdentifierFrom = @(0); + + _groupIdentifierTo = @(0); + + _sceneIdentifierTo = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15077,8 +14648,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRScenesManagementClusterCopySceneParams alloc] init]; + other.mode = self.mode; + other.groupIdentifierFrom = self.groupIdentifierFrom; + other.sceneIdentifierFrom = self.sceneIdentifierFrom; + other.groupIdentifierTo = self.groupIdentifierTo; + other.sceneIdentifierTo = self.sceneIdentifierTo; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15087,18 +14663,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; groupIdentifierTo:%@; sceneIdentifierTo:%@; >", NSStringFromClass([self class]), _mode, _groupIdentifierFrom, _sceneIdentifierFrom, _groupIdentifierTo, _sceneIdentifierTo]; return descriptionString; } @end -@implementation MTRRVCOperationalStateClusterResumeParams (InternalMethods) +@implementation MTRScenesManagementClusterCopySceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); + } + { + encodableStruct.groupIdentifierFrom = self.groupIdentifierFrom.unsignedShortValue; + } + { + encodableStruct.sceneIdentifierFrom = self.sceneIdentifierFrom.unsignedCharValue; + } + { + encodableStruct.groupIdentifierTo = self.groupIdentifierTo.unsignedShortValue; + } + { + encodableStruct.sceneIdentifierTo = self.sceneIdentifierTo.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15138,28 +14729,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams +@implementation MTRScenesManagementClusterCopySceneResponseParams - (instancetype)init { if (self = [super init]) { - _commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; + _status = @(0); + + _groupIdentifierFrom = @(0); + + _sceneIdentifierFrom = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterOperationalCommandResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterCopySceneResponseParams alloc] init]; - other.commandResponseState = self.commandResponseState; + other.status = self.status; + other.groupIdentifierFrom = self.groupIdentifierFrom; + other.sceneIdentifierFrom = self.sceneIdentifierFrom; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; >", NSStringFromClass([self class]), _status, _groupIdentifierFrom, _sceneIdentifierFrom]; return descriptionString; } @@ -15170,7 +14767,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -15205,31 +14802,18 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterCopySceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType &)decodableStruct { { - self.commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; - self.commandResponseState.errorStateID = [NSNumber numberWithUnsignedChar:decodableStruct.commandResponseState.errorStateID]; - if (decodableStruct.commandResponseState.errorStateLabel.HasValue()) { - self.commandResponseState.errorStateLabel = AsString(decodableStruct.commandResponseState.errorStateLabel.Value()); - if (self.commandResponseState.errorStateLabel == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateLabel = nil; - } - if (decodableStruct.commandResponseState.errorStateDetails.HasValue()) { - self.commandResponseState.errorStateDetails = AsString(decodableStruct.commandResponseState.errorStateDetails.Value()); - if (self.commandResponseState.errorStateDetails == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } else { - self.commandResponseState.errorStateDetails = nil; - } + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + self.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:decodableStruct.groupIdentifierFrom]; + } + { + self.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:decodableStruct.sceneIdentifierFrom]; } return CHIP_NO_ERROR; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 9e953f72fcf7f0..42d8a17450841a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -94,120 +94,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRScenesClusterAddSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterAddSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterViewSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterViewSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterRemoveSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterRemoveSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterRemoveAllScenesParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterRemoveAllScenesResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterStoreSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterStoreSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterRecallSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterGetSceneMembershipParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterGetSceneMembershipResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterEnhancedAddSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterEnhancedAddSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterEnhancedViewSceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterEnhancedViewSceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType &)decodableStruct; - -@end - -@interface MTRScenesClusterCopySceneParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRScenesClusterCopySceneResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType &)decodableStruct; - -@end - @interface MTROnOffClusterOffParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -982,6 +868,120 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRScenesManagementClusterAddSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterAddSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterViewSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterViewSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterRemoveSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterRemoveSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterRemoveAllScenesParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterRemoveAllScenesResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterStoreSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterStoreSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterRecallSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterGetSceneMembershipParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterGetSceneMembershipResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterEnhancedAddSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterEnhancedAddSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterEnhancedViewSceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterEnhancedViewSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRScenesManagementClusterCopySceneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRScenesManagementClusterCopySceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType &)decodableStruct; + +@end + @interface MTRHEPAFilterMonitoringClusterResetConditionParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 9b9dfa867c5d24..caa80fba219adb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -41,15 +41,6 @@ static BOOL CommandNeedsTimedInvokeInGroupsCluster(AttributeId aAttributeId) } } } -static BOOL CommandNeedsTimedInvokeInScenesCluster(AttributeId aAttributeId) -{ - using namespace Clusters::Scenes; - switch (aAttributeId) { - default: { - return NO; - } - } -} static BOOL CommandNeedsTimedInvokeInOnOffCluster(AttributeId aAttributeId) { using namespace Clusters::OnOff; @@ -554,6 +545,15 @@ static BOOL CommandNeedsTimedInvokeInRVCOperationalStateCluster(AttributeId aAtt } } } +static BOOL CommandNeedsTimedInvokeInScenesManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ScenesManagement; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInHEPAFilterMonitoringCluster(AttributeId aAttributeId) { using namespace Clusters::HepaFilterMonitoring; @@ -1089,9 +1089,6 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::Groups::Id: { return CommandNeedsTimedInvokeInGroupsCluster(commandID); } - case Clusters::Scenes::Id: { - return CommandNeedsTimedInvokeInScenesCluster(commandID); - } case Clusters::OnOff::Id: { return CommandNeedsTimedInvokeInOnOffCluster(commandID); } @@ -1257,6 +1254,9 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::RvcOperationalState::Id: { return CommandNeedsTimedInvokeInRVCOperationalStateCluster(commandID); } + case Clusters::ScenesManagement::Id: { + return CommandNeedsTimedInvokeInScenesManagementCluster(commandID); + } case Clusters::HepaFilterMonitoring::Id: { return CommandNeedsTimedInvokeInHEPAFilterMonitoringCluster(commandID); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 10fc1751ed0b9e..119031161f5195 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -58,18 +58,6 @@ static id _Nullable DecodeEventPayloadForGroupsCluster(EventId aEventId, TLV::TL *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForScenesCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Scenes; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForOnOffCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::OnOff; @@ -2353,6 +2341,18 @@ static id _Nullable DecodeEventPayloadForRVCOperationalStateCluster(EventId aEve *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForScenesManagementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ScenesManagement; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForHEPAFilterMonitoringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::HepaFilterMonitoring; @@ -4313,9 +4313,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::Groups::Id: { return DecodeEventPayloadForGroupsCluster(aPath.mEventId, aReader, aError); } - case Clusters::Scenes::Id: { - return DecodeEventPayloadForScenesCluster(aPath.mEventId, aReader, aError); - } case Clusters::OnOff::Id: { return DecodeEventPayloadForOnOffCluster(aPath.mEventId, aReader, aError); } @@ -4481,6 +4478,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::RvcOperationalState::Id: { return DecodeEventPayloadForRVCOperationalStateCluster(aPath.mEventId, aReader, aError); } + case Clusters::ScenesManagement::Id: { + return DecodeEventPayloadForScenesManagementCluster(aPath.mEventId, aReader, aError); + } case Clusters::HepaFilterMonitoring::Id: { return DecodeEventPayloadForHEPAFilterMonitoringCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f4c78467774c87..064bd1f321d21e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -19,30 +19,6 @@ NS_ASSUME_NONNULL_BEGIN -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterAttributeValuePair : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull attributeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull attributeId MTR_DEPRECATED("Please use attributeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull attributeValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRScenesClusterExtensionFieldSet : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull clusterID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@property (nonatomic, copy) NSNumber * _Nonnull clusterId MTR_DEPRECATED("Please use clusterID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@property (nonatomic, copy) NSArray * _Nonnull attributeValueList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRScenesClusterSceneInfoStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull sceneCount MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull currentScene MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull currentGroup MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneValid MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull remainingCapacity MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1043,6 +1019,28 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @property (nonatomic, copy) NSNumber * _Nullable pausedTime MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterAttributeValuePair : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull attributeID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull attributeValue MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterExtensionFieldSet : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clusterID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull attributeValueList MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterSceneInfoStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sceneCount MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentScene MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentGroup MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sceneValid MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull remainingCapacity MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRHEPAFilterMonitoringClusterReplacementProductStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull productIdentifierType MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 07f63b03db3ded..d8b97ec82d42fa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -19,128 +19,6 @@ NS_ASSUME_NONNULL_BEGIN -@implementation MTRScenesClusterAttributeValuePair -- (instancetype)init -{ - if (self = [super init]) { - - _attributeID = @(0); - - _attributeValue = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; - - other.attributeID = self.attributeID; - other.attributeValue = self.attributeValue; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeID:%@; attributeValue:%@; >", NSStringFromClass([self class]), _attributeID, _attributeValue]; - return descriptionString; -} - -- (void)setAttributeId:(NSNumber * _Nonnull)attributeId -{ - self.attributeID = attributeId; -} - -- (NSNumber * _Nonnull)attributeId -{ - return self.attributeID; -} - -@end - -@implementation MTRScenesClusterExtensionFieldSet -- (instancetype)init -{ - if (self = [super init]) { - - _clusterID = @(0); - - _attributeValueList = [NSArray array]; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; - - other.clusterID = self.clusterID; - other.attributeValueList = self.attributeValueList; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: clusterID:%@; attributeValueList:%@; >", NSStringFromClass([self class]), _clusterID, _attributeValueList]; - return descriptionString; -} - -- (void)setClusterId:(NSNumber * _Nonnull)clusterId -{ - self.clusterID = clusterId; -} - -- (NSNumber * _Nonnull)clusterId -{ - return self.clusterID; -} - -@end - -@implementation MTRScenesClusterSceneInfoStruct -- (instancetype)init -{ - if (self = [super init]) { - - _sceneCount = @(0); - - _currentScene = @(0); - - _currentGroup = @(0); - - _sceneValid = @(0); - - _remainingCapacity = @(0); - - _fabricIndex = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRScenesClusterSceneInfoStruct alloc] init]; - - other.sceneCount = self.sceneCount; - other.currentScene = self.currentScene; - other.currentGroup = self.currentGroup; - other.sceneValid = self.sceneValid; - other.remainingCapacity = self.remainingCapacity; - other.fabricIndex = self.fabricIndex; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: sceneCount:%@; currentScene:%@; currentGroup:%@; sceneValid:%@; remainingCapacity:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _sceneCount, _currentScene, _currentGroup, _sceneValid, _remainingCapacity, _fabricIndex]; - return descriptionString; -} - -@end - @implementation MTRDescriptorClusterDeviceTypeStruct - (instancetype)init { @@ -4166,6 +4044,108 @@ - (NSString *)description @end +@implementation MTRScenesManagementClusterAttributeValuePair +- (instancetype)init +{ + if (self = [super init]) { + + _attributeID = @(0); + + _attributeValue = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRScenesManagementClusterAttributeValuePair alloc] init]; + + other.attributeID = self.attributeID; + other.attributeValue = self.attributeValue; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeID:%@; attributeValue:%@; >", NSStringFromClass([self class]), _attributeID, _attributeValue]; + return descriptionString; +} + +@end + +@implementation MTRScenesManagementClusterExtensionFieldSet +- (instancetype)init +{ + if (self = [super init]) { + + _clusterID = @(0); + + _attributeValueList = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRScenesManagementClusterExtensionFieldSet alloc] init]; + + other.clusterID = self.clusterID; + other.attributeValueList = self.attributeValueList; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: clusterID:%@; attributeValueList:%@; >", NSStringFromClass([self class]), _clusterID, _attributeValueList]; + return descriptionString; +} + +@end + +@implementation MTRScenesManagementClusterSceneInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _sceneCount = @(0); + + _currentScene = @(0); + + _currentGroup = @(0); + + _sceneValid = @(0); + + _remainingCapacity = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRScenesManagementClusterSceneInfoStruct alloc] init]; + + other.sceneCount = self.sceneCount; + other.currentScene = self.currentScene; + other.currentGroup = self.currentGroup; + other.sceneValid = self.sceneValid; + other.remainingCapacity = self.remainingCapacity; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sceneCount:%@; currentScene:%@; currentGroup:%@; sceneValid:%@; remainingCapacity:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _sceneCount, _currentScene, _currentGroup, _sceneValid, _remainingCapacity, _fabricIndex]; + return descriptionString; +} + +@end + @implementation MTRHEPAFilterMonitoringClusterReplacementProductStruct - (instancetype)init { diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index d99ac5d0939eec..9938d4567f9935 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1512,16 +1512,16 @@ - (void)test017_TestMTRDeviceBasics // are correctly queued in one batch // - Then read 3 duplicates and expect them to be filtered // - Note that these tests can only be verified via logs - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(0) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(0) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(1) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(2) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(3) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(4) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(5) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(1) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(2) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(3) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(4) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(5) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(6) params:nil]; - [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(7) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(6) params:nil]; + [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(7) params:nil]; [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(0) params:nil]; [device readAttributeWithEndpointID:@(1) clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(1) params:nil]; diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift index 862a8f9fe51bc5..e33a03d920fa3b 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift @@ -264,16 +264,16 @@ class MTRSwiftDeviceTests : XCTestCase { // are correctly queued in one batch // - Then read 3 duplicates and expect them to be filtered // - Note that these tests can only be verified via logs - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 0, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 0, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 1, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 2, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 3, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 4, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 5, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 1, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 2, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 3, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 4, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 5, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 6, params: nil) - device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.scenesID.rawValue), attributeID: 7, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 6, params: nil) + device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.colorControlID.rawValue), attributeID: 7, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 0, params: nil) device.readAttribute(withEndpointID: 1, clusterID: NSNumber(value: MTRClusterIDType.levelControlID.rawValue), attributeID: 1, params: nil) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 3a14df9249bffa..e38b7822557b91 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -265,48 +265,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace Groups -namespace Scenes { +namespace OnOff { namespace Attributes { -namespace SceneCount { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace SceneCount - -namespace CurrentScene { +namespace OnOff { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -315,9 +284,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -325,19 +294,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace CurrentScene +} // namespace OnOff -namespace CurrentGroup { +namespace GlobalSceneControl { -EmberAfStatus Get(chip::EndpointId endpoint, chip::GroupId * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -346,9 +315,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::GroupId * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::GroupId value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -356,19 +325,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::GroupId value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_GROUP_ID_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace CurrentGroup +} // namespace GlobalSceneControl -namespace SceneValid { +namespace OnTime { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -377,9 +346,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -387,19 +356,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SceneValid +} // namespace OnTime -namespace NameSupport { +namespace OffWaitTime { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -408,9 +377,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -418,19 +387,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask & value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -442,9 +411,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -452,19 +421,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -474,38 +444,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace LastConfiguredBy - -namespace SceneTableSize { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace SceneTableSize +} // namespace StartUpOnOff namespace FeatureMap { @@ -514,7 +453,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -533,7 +472,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -545,7 +484,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -564,25 +503,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace Scenes +} // namespace OnOff -namespace OnOff { +namespace OnOffSwitchConfiguration { namespace Attributes { -namespace OnOff { +namespace SwitchType { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -591,9 +530,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -601,19 +540,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace OnOff +} // namespace SwitchType -namespace GlobalSceneControl { +namespace SwitchActions { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -622,9 +561,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, bool value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -632,19 +571,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace GlobalSceneControl +} // namespace SwitchActions -namespace OnTime { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -653,9 +592,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -663,19 +602,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace OnTime +} // namespace FeatureMap -namespace OffWaitTime { +namespace ClusterRevision { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -694,19 +633,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace OffWaitTime +} // namespace ClusterRevision -namespace StartUpOnOff { +} // namespace Attributes +} // namespace OnOffSwitchConfiguration -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +namespace LevelControl { +namespace Attributes { + +namespace CurrentLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -718,9 +663,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -728,20 +673,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUp Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -751,16 +695,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, return Set(endpoint, value.Value()); } -} // namespace StartUpOnOff +} // namespace CurrentLevel -namespace FeatureMap { +namespace RemainingTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -769,9 +713,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -779,19 +723,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace RemainingTime -namespace ClusterRevision { +namespace MinLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOff::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -800,9 +744,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -810,261 +754,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OnOff - -namespace OnOffSwitchConfiguration { -namespace Attributes { - -namespace SwitchType { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace SwitchType - -namespace SwitchActions { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace SwitchActions - -namespace FeatureMap { - -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OnOffSwitchConfiguration - -namespace LevelControl { -namespace Attributes { - -namespace CurrentLevel { - -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace CurrentLevel - -namespace RemainingTime { - -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RemainingTime - -namespace MinLevel { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace MinLevel +} // namespace MinLevel namespace MaxLevel { @@ -8707,16 +8400,307 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm:: return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace SmokeSensitivityLevel +} // namespace SmokeSensitivityLevel + +namespace ExpiryDate { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); +} + +} // namespace ExpiryDate + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace SmokeCoAlarm + +namespace DishwasherAlarm { +namespace Attributes { + +namespace Mask { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Mask + +namespace Latch { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Latch + +namespace State { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace State + +namespace Supported { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Supported + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherAlarm + +namespace MicrowaveOvenMode { +namespace Attributes { -namespace ExpiryDate { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8725,9 +8709,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8735,10 +8719,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ExpiryDate +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace MicrowaveOvenMode + +namespace MicrowaveOvenControl { +namespace Attributes { namespace FeatureMap { @@ -8747,7 +8737,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8766,7 +8756,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -8778,7 +8768,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8797,25 +8787,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace SmokeCoAlarm +} // namespace MicrowaveOvenControl -namespace DishwasherAlarm { +namespace OperationalState { namespace Attributes { -namespace Mask { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8824,9 +8814,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8834,19 +8824,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8855,9 +8845,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8865,19 +8855,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +namespace RvcOperationalState { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8886,9 +8882,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8896,19 +8892,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8917,9 +8913,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8927,19 +8923,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8948,9 +8950,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8958,19 +8960,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace SceneCount -namespace ClusterRevision { +namespace CurrentScene { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8979,9 +8981,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8989,25 +8991,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace DishwasherAlarm - -namespace MicrowaveOvenMode { -namespace Attributes { +} // namespace CurrentScene -namespace ClusterRevision { +namespace CurrentGroup { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::GroupId * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9016,9 +9012,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::GroupId value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9026,25 +9022,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_GROUP_ID_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace MicrowaveOvenMode - -namespace MicrowaveOvenControl { -namespace Attributes { +} // namespace CurrentGroup -namespace FeatureMap { +namespace SceneValid { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9053,9 +9043,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, bool value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9063,19 +9053,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace SceneValid -namespace ClusterRevision { +namespace NameSupport { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9084,9 +9074,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9094,56 +9084,72 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace MicrowaveOvenControl - -namespace OperationalState { -namespace Attributes { +} // namespace NameSupport -namespace FeatureMap { +namespace LastConfiguredBy { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); +} -namespace ClusterRevision { +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace LastConfiguredBy + +namespace SceneTableSize { EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9162,16 +9168,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OperationalState - -namespace RvcOperationalState { -namespace Attributes { +} // namespace SceneTableSize namespace FeatureMap { @@ -9180,7 +9180,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9199,7 +9199,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -9211,7 +9211,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ScenesManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9230,13 +9230,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace RvcOperationalState +} // namespace ScenesManagement namespace HepaFilterMonitoring { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index a252bc6f5c1c8e..39bac607884451 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -81,60 +81,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace Groups -namespace Scenes { -namespace Attributes { - -namespace SceneCount { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace SceneCount - -namespace CurrentScene { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace CurrentScene - -namespace CurrentGroup { -EmberAfStatus Get(chip::EndpointId endpoint, chip::GroupId * value); // group_id -EmberAfStatus Set(chip::EndpointId endpoint, chip::GroupId value); -} // namespace CurrentGroup - -namespace SceneValid { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean -EmberAfStatus Set(chip::EndpointId endpoint, bool value); -} // namespace SceneValid - -namespace NameSupport { -EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // NameSupportBitmap -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); -} // namespace NameSupport - -namespace LastConfiguredBy { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // node_id -EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace LastConfiguredBy - -namespace SceneTableSize { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace SceneTableSize - -namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace FeatureMap - -namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Scenes - namespace OnOff { namespace Attributes { @@ -1802,6 +1748,60 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace RvcOperationalState +namespace ScenesManagement { +namespace Attributes { + +namespace SceneCount { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace SceneCount + +namespace CurrentScene { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentScene + +namespace CurrentGroup { +EmberAfStatus Get(chip::EndpointId endpoint, chip::GroupId * value); // group_id +EmberAfStatus Set(chip::EndpointId endpoint, chip::GroupId value); +} // namespace CurrentGroup + +namespace SceneValid { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace SceneValid + +namespace NameSupport { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // NameSupportBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace NameSupport + +namespace LastConfiguredBy { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // node_id +EmberAfStatus Set(chip::EndpointId endpoint, chip::NodeId value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace LastConfiguredBy + +namespace SceneTableSize { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace SceneTableSize + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ScenesManagement + namespace HepaFilterMonitoring { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index a9a862215e6929..33f6cfaa4a01f5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -43,11 +43,6 @@ void emberAfIdentifyClusterInitCallback(chip::EndpointId endpoint); */ void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint); -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfScenesClusterInitCallback(chip::EndpointId endpoint); - /** * @param endpoint Endpoint that is being initialized */ @@ -338,6 +333,11 @@ void emberAfOperationalStateClusterInitCallback(chip::EndpointId endpoint); */ void emberAfRvcOperationalStateClusterInitCallback(chip::EndpointId endpoint); +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfScenesManagementClusterInitCallback(chip::EndpointId endpoint); + /** * @param endpoint Endpoint that is being initialized */ @@ -678,45 +678,6 @@ MatterGroupsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAt */ void emberAfGroupsClusterServerTickCallback(chip::EndpointId endpoint); -// -// Scenes Cluster -// - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfScenesClusterServerInitCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being shutdown - */ -void MatterScenesClusterServerShutdownCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfScenesClusterClientInitCallback(chip::EndpointId endpoint); - -/** - * @param attributePath Concrete attribute path that changed - */ -void MatterScenesClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); - -/** - * @param attributePath Concrete attribute path to be changed - * @param attributeType Attribute type - * @param size Attribute size - * @param value Attribute value - */ -chip::Protocols::InteractionModel::Status -MatterScenesClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** - * @param endpoint Endpoint that is being served - */ -void emberAfScenesClusterServerTickCallback(chip::EndpointId endpoint); - // // On/Off Cluster // @@ -2955,6 +2916,45 @@ chip::Protocols::InteractionModel::Status MatterRvcOperationalStateClusterServer */ void emberAfRvcOperationalStateClusterServerTickCallback(chip::EndpointId endpoint); +// +// Scenes Management Cluster +// + +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfScenesManagementClusterServerInitCallback(chip::EndpointId endpoint); + +/** + * @param endpoint Endpoint that is being shutdown + */ +void MatterScenesManagementClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** + * @param endpoint Endpoint that is being initialized + */ +void emberAfScenesManagementClusterClientInitCallback(chip::EndpointId endpoint); + +/** + * @param attributePath Concrete attribute path that changed + */ +void MatterScenesManagementClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterScenesManagementClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** + * @param endpoint Endpoint that is being served + */ +void emberAfScenesManagementClusterServerTickCallback(chip::EndpointId endpoint); + // // HEPA Filter Monitoring Cluster // diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index c432fafd45043d..ef36497d5375db 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -86,30 +86,6 @@ enum class NameSupportBitmap : uint8_t }; } // namespace Groups -namespace Scenes { - -// Bitmap for CopyModeBitmap -enum class CopyModeBitmap : uint8_t -{ - kCopyAllScenes = 0x1, -}; - -// Bitmap for Feature -enum class Feature : uint32_t -{ - kSceneNames = 0x1, - kExplicit = 0x2, - kTableSize = 0x4, - kFabricScenes = 0x8, -}; - -// Bitmap for NameSupportBitmap -enum class NameSupportBitmap : uint8_t -{ - kSceneNames = 0x80, -}; -} // namespace Scenes - namespace OnOff { // Enum for DelayedAllOffEffectVariantEnum @@ -2036,6 +2012,30 @@ enum class OperationalStateEnum : uint8_t }; } // namespace RvcOperationalState +namespace ScenesManagement { + +// Bitmap for CopyModeBitmap +enum class CopyModeBitmap : uint8_t +{ + kCopyAllScenes = 0x1, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kSceneNames = 0x1, + kExplicit = 0x2, + kTableSize = 0x4, + kFabricScenes = 0x8, +}; + +// Bitmap for NameSupportBitmap +enum class NameSupportBitmap : uint8_t +{ + kSceneNames = 0x80, +}; +} // namespace ScenesManagement + namespace HepaFilterMonitoring { // Enum for ChangeIndicationEnum diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 7222179be4c93e..a9a99a79658241 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -840,15 +840,13 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace Groups -namespace Scenes { -namespace Structs { +namespace OnOff { -namespace AttributeValuePair { +namespace Commands { +namespace Off { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAttributeID), attributeID); - encoder.Encode(to_underlying(Fields::kAttributeValue), attributeValue); return encoder.Finalize(); } @@ -862,34 +860,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kAttributeID)) - { - err = DataModel::Decode(reader, attributeID); - } - else if (__context_tag == to_underlying(Fields::kAttributeValue)) - { - err = DataModel::Decode(reader, attributeValue); - } - else - { - } - - ReturnErrorOnFailure(err); } } - -} // namespace AttributeValuePair - -namespace ExtensionFieldSet { +} // namespace Off. +namespace On { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kClusterID), clusterID); - encoder.Encode(to_underlying(Fields::kAttributeValueList), attributeValueList); return encoder.Finalize(); } @@ -903,64 +880,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kClusterID)) - { - err = DataModel::Decode(reader, clusterID); - } - else if (__context_tag == to_underlying(Fields::kAttributeValueList)) - { - err = DataModel::Decode(reader, attributeValueList); - } - else - { - } - - ReturnErrorOnFailure(err); } } - -} // namespace ExtensionFieldSet - -namespace SceneInfoStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} - -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +} // namespace On. +namespace Toggle { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - encoder.Encode(to_underlying(Fields::kSceneCount), sceneCount); - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kCurrentScene), currentScene); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kCurrentGroup), currentGroup); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kSceneValid), sceneValid); - } - encoder.Encode(to_underlying(Fields::kRemainingCapacity), remainingCapacity); - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - return encoder.Finalize(); } @@ -974,55 +900,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kSceneCount)) - { - err = DataModel::Decode(reader, sceneCount); - } - else if (__context_tag == to_underlying(Fields::kCurrentScene)) - { - err = DataModel::Decode(reader, currentScene); - } - else if (__context_tag == to_underlying(Fields::kCurrentGroup)) - { - err = DataModel::Decode(reader, currentGroup); - } - else if (__context_tag == to_underlying(Fields::kSceneValid)) - { - err = DataModel::Decode(reader, sceneValid); - } - else if (__context_tag == to_underlying(Fields::kRemainingCapacity)) - { - err = DataModel::Decode(reader, remainingCapacity); - } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else - { - } - - ReturnErrorOnFailure(err); } } - -} // namespace SceneInfoStruct -} // namespace Structs - -namespace Commands { -namespace AddScene { +} // namespace Toggle. +namespace OffWithEffect { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kSceneName), sceneName); - encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); + encoder.Encode(to_underlying(Fields::kEffectIdentifier), effectIdentifier); + encoder.Encode(to_underlying(Fields::kEffectVariant), effectVariant); return encoder.Finalize(); } @@ -1040,25 +926,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) - { - err = DataModel::Decode(reader, groupID); - } - else if (__context_tag == to_underlying(Fields::kSceneID)) - { - err = DataModel::Decode(reader, sceneID); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kSceneName)) + if (__context_tag == to_underlying(Fields::kEffectIdentifier)) { - err = DataModel::Decode(reader, sceneName); + err = DataModel::Decode(reader, effectIdentifier); } - else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + else if (__context_tag == to_underlying(Fields::kEffectVariant)) { - err = DataModel::Decode(reader, extensionFieldSets); + err = DataModel::Decode(reader, effectVariant); } else { @@ -1067,14 +941,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddScene. -namespace AddSceneResponse { +} // namespace OffWithEffect. +namespace OnWithRecallGlobalScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -1088,36 +959,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kGroupID)) - { - err = DataModel::Decode(reader, groupID); - } - else if (__context_tag == to_underlying(Fields::kSceneID)) - { - err = DataModel::Decode(reader, sceneID); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace AddSceneResponse. -namespace ViewScene { +} // namespace OnWithRecallGlobalScene. +namespace OnWithTimedOff { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kOnOffControl), onOffControl); + encoder.Encode(to_underlying(Fields::kOnTime), onTime); + encoder.Encode(to_underlying(Fields::kOffWaitTime), offWaitTime); return encoder.Finalize(); } @@ -1135,13 +986,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kOnOffControl)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, onOffControl); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kOnTime)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, onTime); + } + else if (__context_tag == to_underlying(Fields::kOffWaitTime)) + { + err = DataModel::Decode(reader, offWaitTime); } else { @@ -1150,72 +1005,90 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ViewScene. -namespace ViewSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kSceneName), sceneName); - encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); - return encoder.Finalize(); -} +} // namespace OnWithTimedOff. +} // namespace Commands -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kGroupID)) - { - err = DataModel::Decode(reader, groupID); - } - else if (__context_tag == to_underlying(Fields::kSceneID)) - { - err = DataModel::Decode(reader, sceneID); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kSceneName)) - { - err = DataModel::Decode(reader, sceneName); - } - else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) - { - err = DataModel::Decode(reader, extensionFieldSets); - } - else - { - } + case Attributes::OnOff::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onOff); + case Attributes::GlobalSceneControl::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, globalSceneControl); + case Attributes::OnTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onTime); + case Attributes::OffWaitTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, offWaitTime); + case Attributes::StartUpOnOff::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpOnOff); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes - ReturnErrorOnFailure(err); +namespace Events {} // namespace Events + +} // namespace OnOff +namespace OnOffSwitchConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SwitchType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, switchType); + case Attributes::SwitchActions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, switchActions); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace ViewSceneResponse. -namespace RemoveScene { +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OnOffSwitchConfiguration +namespace LevelControl { + +namespace Commands { +namespace MoveToLevel { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kLevel), level); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1233,13 +1106,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kLevel)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, level); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kTransitionTime)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1248,14 +1129,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RemoveScene. -namespace RemoveSceneResponse { +} // namespace MoveToLevel. +namespace Move { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1273,17 +1155,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) + if (__context_tag == to_underlying(Fields::kMoveMode)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, moveMode); } - else if (__context_tag == to_underlying(Fields::kGroupID)) + else if (__context_tag == to_underlying(Fields::kRate)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, rate); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kOptionsMask)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1292,12 +1178,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RemoveSceneResponse. -namespace RemoveAllScenes { +} // namespace Move. +namespace Step { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1315,9 +1205,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kStepMode)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, stepMode); + } + else if (__context_tag == to_underlying(Fields::kStepSize)) + { + err = DataModel::Decode(reader, stepSize); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1326,13 +1232,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RemoveAllScenes. -namespace RemoveAllScenesResponse { +} // namespace Step. +namespace Stop { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1350,13 +1256,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) + if (__context_tag == to_underlying(Fields::kOptionsMask)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, optionsMask); } - else if (__context_tag == to_underlying(Fields::kGroupID)) + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1365,13 +1271,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RemoveAllScenesResponse. -namespace StoreScene { +} // namespace Stop. +namespace MoveToLevelWithOnOff { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kLevel), level); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1389,13 +1297,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kLevel)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, level); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kTransitionTime)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1404,14 +1320,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StoreScene. -namespace StoreSceneResponse { +} // namespace MoveToLevelWithOnOff. +namespace MoveWithOnOff { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); + encoder.Encode(to_underlying(Fields::kRate), rate); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1429,17 +1346,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) + if (__context_tag == to_underlying(Fields::kMoveMode)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, moveMode); } - else if (__context_tag == to_underlying(Fields::kGroupID)) + else if (__context_tag == to_underlying(Fields::kRate)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, rate); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kOptionsMask)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1448,14 +1369,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StoreSceneResponse. -namespace RecallScene { +} // namespace MoveWithOnOff. +namespace StepWithOnOff { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kStepMode), stepMode); + encoder.Encode(to_underlying(Fields::kStepSize), stepSize); encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); return encoder.Finalize(); } @@ -1473,18 +1396,26 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kStepMode)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, stepMode); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kStepSize)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, stepSize); } else if (__context_tag == to_underlying(Fields::kTransitionTime)) { err = DataModel::Decode(reader, transitionTime); } + else if (__context_tag == to_underlying(Fields::kOptionsMask)) + { + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); + } else { } @@ -1492,13 +1423,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RecallScene. -namespace GetSceneMembership { +} // namespace StepWithOnOff. +namespace StopWithOnOff { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - return encoder.Finalize(); + encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); + encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -1515,9 +1447,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kOptionsMask)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, optionsMask); + } + else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + { + err = DataModel::Decode(reader, optionsOverride); } else { @@ -1526,15 +1462,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetSceneMembership. -namespace GetSceneMembershipResponse { +} // namespace StopWithOnOff. +namespace MoveToClosestFrequency { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kCapacity), capacity); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneList), sceneList); + encoder.Encode(to_underlying(Fields::kFrequency), frequency); return encoder.Finalize(); } @@ -1552,21 +1485,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kCapacity)) - { - err = DataModel::Decode(reader, capacity); - } - else if (__context_tag == to_underlying(Fields::kGroupID)) - { - err = DataModel::Decode(reader, groupID); - } - else if (__context_tag == to_underlying(Fields::kSceneList)) + if (__context_tag == to_underlying(Fields::kFrequency)) { - err = DataModel::Decode(reader, sceneList); + err = DataModel::Decode(reader, frequency); } else { @@ -1575,68 +1496,150 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace GetSceneMembershipResponse. -namespace EnhancedAddScene { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +} // namespace MoveToClosestFrequency. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kSceneName), sceneName); - encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); - return encoder.Finalize(); + switch (path.mAttributeId) + { + case Attributes::CurrentLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentLevel); + case Attributes::RemainingTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remainingTime); + case Attributes::MinLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minLevel); + case Attributes::MaxLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxLevel); + case Attributes::CurrentFrequency::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentFrequency); + case Attributes::MinFrequency::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minFrequency); + case Attributes::MaxFrequency::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxFrequency); + case Attributes::Options::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, options); + case Attributes::OnOffTransitionTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onOffTransitionTime); + case Attributes::OnLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onLevel); + case Attributes::OnTransitionTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onTransitionTime); + case Attributes::OffTransitionTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, offTransitionTime); + case Attributes::DefaultMoveRate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultMoveRate); + case Attributes::StartUpCurrentLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpCurrentLevel); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } } +} // namespace Attributes -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Events {} // namespace Events + +} // namespace LevelControl +namespace BinaryInputBasic { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + case Attributes::ActiveText::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeText); + case Attributes::Description::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, description); + case Attributes::InactiveText::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, inactiveText); + case Attributes::OutOfService::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, outOfService); + case Attributes::Polarity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, polarity); + case Attributes::PresentValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, presentValue); + case Attributes::Reliability::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, reliability); + case Attributes::StatusFlags::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, statusFlags); + case Attributes::ApplicationType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, applicationType); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); +namespace Events {} // namespace Events - if (__context_tag == to_underlying(Fields::kGroupID)) - { - err = DataModel::Decode(reader, groupID); - } - else if (__context_tag == to_underlying(Fields::kSceneID)) - { - err = DataModel::Decode(reader, sceneID); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kSceneName)) - { - err = DataModel::Decode(reader, sceneName); - } - else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) - { - err = DataModel::Decode(reader, extensionFieldSets); - } - else - { - } +} // namespace BinaryInputBasic +namespace PulseWidthModulation { - ReturnErrorOnFailure(err); +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace EnhancedAddScene. -namespace EnhancedAddSceneResponse { +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace PulseWidthModulation +namespace Descriptor { +namespace Structs { + +namespace DeviceTypeStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kDeviceType), deviceType); + encoder.Encode(to_underlying(Fields::kRevision), revision); return encoder.Finalize(); } @@ -1654,17 +1657,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kDeviceType)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, deviceType); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kRevision)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, revision); } else { @@ -1673,13 +1672,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedAddSceneResponse. -namespace EnhancedViewScene { + +} // namespace DeviceTypeStruct + +namespace SemanticTagStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); + encoder.Encode(to_underlying(Fields::kNamespaceID), namespaceID); + encoder.Encode(to_underlying(Fields::kTag), tag); + encoder.Encode(to_underlying(Fields::kLabel), label); return encoder.Finalize(); } @@ -1697,13 +1700,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kMfgCode)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, mfgCode); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kNamespaceID)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, namespaceID); + } + else if (__context_tag == to_underlying(Fields::kTag)) + { + err = DataModel::Decode(reader, tag); + } + else if (__context_tag == to_underlying(Fields::kLabel)) + { + err = DataModel::Decode(reader, label); } else { @@ -1712,17 +1723,76 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedViewScene. -namespace EnhancedViewSceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + +} // namespace SemanticTagStruct +} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::DeviceTypeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, deviceTypeList); + case Attributes::ServerList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, serverList); + case Attributes::ClientList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clientList); + case Attributes::PartsList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, partsList); + case Attributes::TagList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, tagList); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Descriptor +namespace Binding { +namespace Structs { + +namespace TargetStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupID), groupID); - encoder.Encode(to_underlying(Fields::kSceneID), sceneID); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kSceneName), sceneName); - encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); + + encoder.Encode(to_underlying(Fields::kNode), node); + encoder.Encode(to_underlying(Fields::kGroup), group); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); + encoder.Encode(to_underlying(Fields::kCluster), cluster); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -1740,29 +1810,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kGroupID)) + if (__context_tag == to_underlying(Fields::kNode)) { - err = DataModel::Decode(reader, groupID); + err = DataModel::Decode(reader, node); } - else if (__context_tag == to_underlying(Fields::kSceneID)) + else if (__context_tag == to_underlying(Fields::kGroup)) { - err = DataModel::Decode(reader, sceneID); + err = DataModel::Decode(reader, group); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kEndpoint)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, endpoint); } - else if (__context_tag == to_underlying(Fields::kSceneName)) + else if (__context_tag == to_underlying(Fields::kCluster)) { - err = DataModel::Decode(reader, sceneName); + err = DataModel::Decode(reader, cluster); } - else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + else if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, extensionFieldSets); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -1771,16 +1837,50 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnhancedViewSceneResponse. -namespace CopyScene { + +} // namespace TargetStruct +} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Binding::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, binding); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Binding +namespace AccessControl { +namespace Structs { + +namespace AccessControlTargetStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMode), mode); - encoder.Encode(to_underlying(Fields::kGroupIdentifierFrom), groupIdentifierFrom); - encoder.Encode(to_underlying(Fields::kSceneIdentifierFrom), sceneIdentifierFrom); - encoder.Encode(to_underlying(Fields::kGroupIdentifierTo), groupIdentifierTo); - encoder.Encode(to_underlying(Fields::kSceneIdentifierTo), sceneIdentifierTo); + encoder.Encode(to_underlying(Fields::kCluster), cluster); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); + encoder.Encode(to_underlying(Fields::kDeviceType), deviceType); return encoder.Finalize(); } @@ -1798,25 +1898,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMode)) - { - err = DataModel::Decode(reader, mode); - } - else if (__context_tag == to_underlying(Fields::kGroupIdentifierFrom)) - { - err = DataModel::Decode(reader, groupIdentifierFrom); - } - else if (__context_tag == to_underlying(Fields::kSceneIdentifierFrom)) + if (__context_tag == to_underlying(Fields::kCluster)) { - err = DataModel::Decode(reader, sceneIdentifierFrom); + err = DataModel::Decode(reader, cluster); } - else if (__context_tag == to_underlying(Fields::kGroupIdentifierTo)) + else if (__context_tag == to_underlying(Fields::kEndpoint)) { - err = DataModel::Decode(reader, groupIdentifierTo); + err = DataModel::Decode(reader, endpoint); } - else if (__context_tag == to_underlying(Fields::kSceneIdentifierTo)) + else if (__context_tag == to_underlying(Fields::kDeviceType)) { - err = DataModel::Decode(reader, sceneIdentifierTo); + err = DataModel::Decode(reader, deviceType); } else { @@ -1825,14 +1917,47 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CopyScene. -namespace CopySceneResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + +} // namespace AccessControlTargetStruct + +namespace AccessControlEntryStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kGroupIdentifierFrom), groupIdentifierFrom); - encoder.Encode(to_underlying(Fields::kSceneIdentifierFrom), sceneIdentifierFrom); + + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kPrivilege), privilege); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kAuthMode), authMode); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kSubjects), subjects); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kTargets), targets); + } + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -1850,17 +1975,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) + if (__context_tag == to_underlying(Fields::kPrivilege)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, privilege); } - else if (__context_tag == to_underlying(Fields::kGroupIdentifierFrom)) + else if (__context_tag == to_underlying(Fields::kAuthMode)) { - err = DataModel::Decode(reader, groupIdentifierFrom); + err = DataModel::Decode(reader, authMode); } - else if (__context_tag == to_underlying(Fields::kSceneIdentifierFrom)) + else if (__context_tag == to_underlying(Fields::kSubjects)) { - err = DataModel::Decode(reader, sceneIdentifierFrom); + err = DataModel::Decode(reader, subjects); + } + else if (__context_tag == to_underlying(Fields::kTargets)) + { + err = DataModel::Decode(reader, targets); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -1869,58 +2002,35 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CopySceneResponse. -} // namespace Commands -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +} // namespace AccessControlEntryStruct + +namespace AccessControlExtensionStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) - { - case Attributes::SceneCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sceneCount); - case Attributes::CurrentScene::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentScene); - case Attributes::CurrentGroup::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentGroup); - case Attributes::SceneValid::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sceneValid); - case Attributes::NameSupport::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, nameSupport); - case Attributes::LastConfiguredBy::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lastConfiguredBy); - case Attributes::SceneTableSize::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sceneTableSize); - case Attributes::FabricSceneInfo::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, fabricSceneInfo); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } + return DoEncode(aWriter, aTag, NullOptional); } -} // namespace Attributes - -namespace Events {} // namespace Events -} // namespace Scenes -namespace OnOff { +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} -namespace Commands { -namespace Off { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kData), data); + } + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -1934,34 +2044,76 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kData)) + { + err = DataModel::Decode(reader, data); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Off. -namespace On { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +} // namespace AccessControlExtensionStruct +} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + case Attributes::Acl::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acl); + case Attributes::Extension::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, extension); + case Attributes::SubjectsPerAccessControlEntry::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, subjectsPerAccessControlEntry); + case Attributes::TargetsPerAccessControlEntry::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetsPerAccessControlEntry); + case Attributes::AccessControlEntriesPerFabric::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, accessControlEntriesPerFabric); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace On. -namespace Toggle { +} // namespace Attributes + +namespace Events { +namespace AccessControlEntryChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); + ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -1974,16 +2126,49 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kAdminNodeID)) + { + err = DataModel::Decode(reader, adminNodeID); + } + else if (__context_tag == to_underlying(Fields::kAdminPasscodeID)) + { + err = DataModel::Decode(reader, adminPasscodeID); + } + else if (__context_tag == to_underlying(Fields::kChangeType)) + { + err = DataModel::Decode(reader, changeType); + } + else if (__context_tag == to_underlying(Fields::kLatestValue)) + { + err = DataModel::Decode(reader, latestValue); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Toggle. -namespace OffWithEffect { +} // namespace AccessControlEntryChanged. +namespace AccessControlExtensionChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kEffectIdentifier), effectIdentifier); - encoder.Encode(to_underlying(Fields::kEffectVariant), effectVariant); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); + ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -2000,13 +2185,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kEffectIdentifier)) + if (__context_tag == to_underlying(Fields::kAdminNodeID)) { - err = DataModel::Decode(reader, effectIdentifier); + err = DataModel::Decode(reader, adminNodeID); } - else if (__context_tag == to_underlying(Fields::kEffectVariant)) + else if (__context_tag == to_underlying(Fields::kAdminPasscodeID)) { - err = DataModel::Decode(reader, effectVariant); + err = DataModel::Decode(reader, adminPasscodeID); + } + else if (__context_tag == to_underlying(Fields::kChangeType)) + { + err = DataModel::Decode(reader, changeType); + } + else if (__context_tag == to_underlying(Fields::kLatestValue)) + { + err = DataModel::Decode(reader, latestValue); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -2015,11 +2212,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OffWithEffect. -namespace OnWithRecallGlobalScene { +} // namespace AccessControlExtensionChanged. +} // namespace Events + +} // namespace AccessControl +namespace Actions { +namespace Structs { + +namespace ActionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kType), type); + encoder.Encode(to_underlying(Fields::kEndpointListID), endpointListID); + encoder.Encode(to_underlying(Fields::kSupportedCommands), supportedCommands); + encoder.Encode(to_underlying(Fields::kState), state); return encoder.Finalize(); } @@ -2033,16 +2242,52 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kActionID)) + { + err = DataModel::Decode(reader, actionID); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kType)) + { + err = DataModel::Decode(reader, type); + } + else if (__context_tag == to_underlying(Fields::kEndpointListID)) + { + err = DataModel::Decode(reader, endpointListID); + } + else if (__context_tag == to_underlying(Fields::kSupportedCommands)) + { + err = DataModel::Decode(reader, supportedCommands); + } + else if (__context_tag == to_underlying(Fields::kState)) + { + err = DataModel::Decode(reader, state); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace OnWithRecallGlobalScene. -namespace OnWithTimedOff { + +} // namespace ActionStruct + +namespace EndpointListStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOnOffControl), onOffControl); - encoder.Encode(to_underlying(Fields::kOnTime), onTime); - encoder.Encode(to_underlying(Fields::kOffWaitTime), offWaitTime); + encoder.Encode(to_underlying(Fields::kEndpointListID), endpointListID); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kType), type); + encoder.Encode(to_underlying(Fields::kEndpoints), endpoints); return encoder.Finalize(); } @@ -2060,17 +2305,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kOnOffControl)) + if (__context_tag == to_underlying(Fields::kEndpointListID)) { - err = DataModel::Decode(reader, onOffControl); + err = DataModel::Decode(reader, endpointListID); } - else if (__context_tag == to_underlying(Fields::kOnTime)) + else if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, onTime); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kOffWaitTime)) + else if (__context_tag == to_underlying(Fields::kType)) { - err = DataModel::Decode(reader, offWaitTime); + err = DataModel::Decode(reader, type); + } + else if (__context_tag == to_underlying(Fields::kEndpoints)) + { + err = DataModel::Decode(reader, endpoints); } else { @@ -2079,90 +2328,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OnWithTimedOff. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::OnOff::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onOff); - case Attributes::GlobalSceneControl::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, globalSceneControl); - case Attributes::OnTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onTime); - case Attributes::OffWaitTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, offWaitTime); - case Attributes::StartUpOnOff::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpOnOff); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace OnOff -namespace OnOffSwitchConfiguration { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::SwitchType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, switchType); - case Attributes::SwitchActions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, switchActions); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes -namespace Events {} // namespace Events - -} // namespace OnOffSwitchConfiguration -namespace LevelControl { +} // namespace EndpointListStruct +} // namespace Structs namespace Commands { -namespace MoveToLevel { +namespace InstantAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLevel), level); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2180,21 +2356,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLevel)) - { - err = DataModel::Decode(reader, level); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); } else { @@ -2203,15 +2371,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToLevel. -namespace Move { +} // namespace InstantAction. +namespace InstantActionWithTransition { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); return encoder.Finalize(); } @@ -2229,21 +2396,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMoveMode)) - { - err = DataModel::Decode(reader, moveMode); - } - else if (__context_tag == to_underlying(Fields::kRate)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, rate); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, invokeID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kTransitionTime)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, transitionTime); } else { @@ -2252,16 +2415,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Move. -namespace Step { +} // namespace InstantActionWithTransition. +namespace StartAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2279,25 +2439,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStepMode)) - { - err = DataModel::Decode(reader, stepMode); - } - else if (__context_tag == to_underlying(Fields::kStepSize)) - { - err = DataModel::Decode(reader, stepSize); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); } else { @@ -2306,13 +2454,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Step. -namespace Stop { +} // namespace StartAction. +namespace StartActionWithDuration { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kDuration), duration); return encoder.Finalize(); } @@ -2330,13 +2479,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); + } + else if (__context_tag == to_underlying(Fields::kDuration)) + { + err = DataModel::Decode(reader, duration); } else { @@ -2345,15 +2498,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Stop. -namespace MoveToLevelWithOnOff { +} // namespace StartActionWithDuration. +namespace StopAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLevel), level); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2371,21 +2522,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLevel)) - { - err = DataModel::Decode(reader, level); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); } else { @@ -2394,15 +2537,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToLevelWithOnOff. -namespace MoveWithOnOff { +} // namespace StopAction. +namespace PauseAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMoveMode), moveMode); - encoder.Encode(to_underlying(Fields::kRate), rate); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2420,21 +2561,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMoveMode)) - { - err = DataModel::Decode(reader, moveMode); - } - else if (__context_tag == to_underlying(Fields::kRate)) - { - err = DataModel::Decode(reader, rate); - } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); } else { @@ -2443,16 +2576,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveWithOnOff. -namespace StepWithOnOff { +} // namespace PauseAction. +namespace PauseActionWithDuration { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStepMode), stepMode); - encoder.Encode(to_underlying(Fields::kStepSize), stepSize); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kDuration), duration); return encoder.Finalize(); } @@ -2470,25 +2601,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStepMode)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, stepMode); - } - else if (__context_tag == to_underlying(Fields::kStepSize)) - { - err = DataModel::Decode(reader, stepSize); - } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) - { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsMask)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, invokeID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, duration); } else { @@ -2497,13 +2620,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StepWithOnOff. -namespace StopWithOnOff { +} // namespace PauseActionWithDuration. +namespace ResumeAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOptionsMask), optionsMask); - encoder.Encode(to_underlying(Fields::kOptionsOverride), optionsOverride); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2521,13 +2644,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kOptionsMask)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, optionsMask); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kOptionsOverride)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, optionsOverride); + err = DataModel::Decode(reader, invokeID); } else { @@ -2536,12 +2659,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StopWithOnOff. -namespace MoveToClosestFrequency { +} // namespace ResumeAction. +namespace EnableAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFrequency), frequency); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2559,9 +2683,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFrequency)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, frequency); + err = DataModel::Decode(reader, actionID); + } + else if (__context_tag == to_underlying(Fields::kInvokeID)) + { + err = DataModel::Decode(reader, invokeID); } else { @@ -2570,150 +2698,57 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MoveToClosestFrequency. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +} // namespace EnableAction. +namespace EnableActionWithDuration { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) - { - case Attributes::CurrentLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentLevel); - case Attributes::RemainingTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, remainingTime); - case Attributes::MinLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minLevel); - case Attributes::MaxLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxLevel); - case Attributes::CurrentFrequency::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentFrequency); - case Attributes::MinFrequency::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minFrequency); - case Attributes::MaxFrequency::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxFrequency); - case Attributes::Options::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, options); - case Attributes::OnOffTransitionTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onOffTransitionTime); - case Attributes::OnLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onLevel); - case Attributes::OnTransitionTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onTransitionTime); - case Attributes::OffTransitionTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, offTransitionTime); - case Attributes::DefaultMoveRate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, defaultMoveRate); - case Attributes::StartUpCurrentLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpCurrentLevel); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kDuration), duration); + return encoder.Finalize(); } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace LevelControl -namespace BinaryInputBasic { -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::ActiveText::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeText); - case Attributes::Description::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, description); - case Attributes::InactiveText::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, inactiveText); - case Attributes::OutOfService::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, outOfService); - case Attributes::Polarity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, polarity); - case Attributes::PresentValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, presentValue); - case Attributes::Reliability::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reliability); - case Attributes::StatusFlags::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, statusFlags); - case Attributes::ApplicationType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, applicationType); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -} // namespace BinaryInputBasic -namespace PulseWidthModulation { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kActionID)) + { + err = DataModel::Decode(reader, actionID); + } + else if (__context_tag == to_underlying(Fields::kInvokeID)) + { + err = DataModel::Decode(reader, invokeID); + } + else if (__context_tag == to_underlying(Fields::kDuration)) + { + err = DataModel::Decode(reader, duration); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace PulseWidthModulation -namespace Descriptor { -namespace Structs { - -namespace DeviceTypeStruct { +} // namespace EnableActionWithDuration. +namespace DisableAction { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDeviceType), deviceType); - encoder.Encode(to_underlying(Fields::kRevision), revision); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); return encoder.Finalize(); } @@ -2731,13 +2766,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDeviceType)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, deviceType); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kRevision)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, revision); + err = DataModel::Decode(reader, invokeID); } else { @@ -2746,17 +2781,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace DeviceTypeStruct - -namespace SemanticTagStruct { +} // namespace DisableAction. +namespace DisableActionWithDuration { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); - encoder.Encode(to_underlying(Fields::kNamespaceID), namespaceID); - encoder.Encode(to_underlying(Fields::kTag), tag); - encoder.Encode(to_underlying(Fields::kLabel), label); + encoder.Encode(to_underlying(Fields::kActionID), actionID); + encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kDuration), duration); return encoder.Finalize(); } @@ -2774,21 +2806,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMfgCode)) - { - err = DataModel::Decode(reader, mfgCode); - } - else if (__context_tag == to_underlying(Fields::kNamespaceID)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, namespaceID); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kTag)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, tag); + err = DataModel::Decode(reader, invokeID); } - else if (__context_tag == to_underlying(Fields::kLabel)) + else if (__context_tag == to_underlying(Fields::kDuration)) { - err = DataModel::Decode(reader, label); + err = DataModel::Decode(reader, duration); } else { @@ -2797,27 +2825,20 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace SemanticTagStruct -} // namespace Structs - -namespace Commands {} // namespace Commands +} // namespace DisableActionWithDuration. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::DeviceTypeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, deviceTypeList); - case Attributes::ServerList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, serverList); - case Attributes::ClientList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clientList); - case Attributes::PartsList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, partsList); - case Attributes::TagList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, tagList); + case Attributes::ActionList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, actionList); + case Attributes::EndpointLists::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, endpointLists); + case Attributes::SetupURL::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setupURL); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -2836,38 +2857,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace Descriptor -namespace Binding { -namespace Structs { - -namespace TargetStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} - -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +namespace Events { +namespace StateChanged { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - encoder.Encode(to_underlying(Fields::kNode), node); - encoder.Encode(to_underlying(Fields::kGroup), group); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - encoder.Encode(to_underlying(Fields::kCluster), cluster); - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -2884,25 +2883,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNode)) - { - err = DataModel::Decode(reader, node); - } - else if (__context_tag == to_underlying(Fields::kGroup)) - { - err = DataModel::Decode(reader, group); - } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kCluster)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, cluster); + err = DataModel::Decode(reader, invokeID); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kNewState)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, newState); } else { @@ -2911,51 +2902,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace TargetStruct -} // namespace Structs - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::Binding::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, binding); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace Binding -namespace AccessControl { -namespace Structs { - -namespace AccessControlTargetStruct { +} // namespace StateChanged. +namespace ActionFailed { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCluster), cluster); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - encoder.Encode(to_underlying(Fields::kDeviceType), deviceType); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kError), error)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -2972,17 +2929,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCluster)) + if (__context_tag == to_underlying(Fields::kActionID)) { - err = DataModel::Decode(reader, cluster); + err = DataModel::Decode(reader, actionID); } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + else if (__context_tag == to_underlying(Fields::kInvokeID)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, invokeID); } - else if (__context_tag == to_underlying(Fields::kDeviceType)) + else if (__context_tag == to_underlying(Fields::kNewState)) { - err = DataModel::Decode(reader, deviceType); + err = DataModel::Decode(reader, newState); + } + else if (__context_tag == to_underlying(Fields::kError)) + { + err = DataModel::Decode(reader, error); } else { @@ -2991,47 +2952,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace ActionFailed. +} // namespace Events -} // namespace AccessControlTargetStruct - -namespace AccessControlEntryStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} +} // namespace Actions +namespace BasicInformation { +namespace Structs { -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +namespace CapabilityMinimaStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kPrivilege), privilege); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kAuthMode), authMode); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kSubjects), subjects); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kTargets), targets); - } - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - + encoder.Encode(to_underlying(Fields::kCaseSessionsPerFabric), caseSessionsPerFabric); + encoder.Encode(to_underlying(Fields::kSubscriptionsPerFabric), subscriptionsPerFabric); return encoder.Finalize(); } @@ -3049,25 +2982,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPrivilege)) - { - err = DataModel::Decode(reader, privilege); - } - else if (__context_tag == to_underlying(Fields::kAuthMode)) - { - err = DataModel::Decode(reader, authMode); - } - else if (__context_tag == to_underlying(Fields::kSubjects)) - { - err = DataModel::Decode(reader, subjects); - } - else if (__context_tag == to_underlying(Fields::kTargets)) + if (__context_tag == to_underlying(Fields::kCaseSessionsPerFabric)) { - err = DataModel::Decode(reader, targets); + err = DataModel::Decode(reader, caseSessionsPerFabric); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kSubscriptionsPerFabric)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, subscriptionsPerFabric); } else { @@ -3077,34 +2998,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace AccessControlEntryStruct - -namespace AccessControlExtensionStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} +} // namespace CapabilityMinimaStruct -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +namespace ProductAppearanceStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kData), data); - } - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - + encoder.Encode(to_underlying(Fields::kFinish), finish); + encoder.Encode(to_underlying(Fields::kPrimaryColor), primaryColor); return encoder.Finalize(); } @@ -3122,13 +3023,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kData)) + if (__context_tag == to_underlying(Fields::kFinish)) { - err = DataModel::Decode(reader, data); + err = DataModel::Decode(reader, finish); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kPrimaryColor)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, primaryColor); } else { @@ -3138,26 +3039,83 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace AccessControlExtensionStruct +} // namespace ProductAppearanceStruct } // namespace Structs -namespace Commands {} // namespace Commands +namespace Commands { +namespace MfgSpecificPing { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace MfgSpecificPing. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::Acl::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acl); - case Attributes::Extension::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, extension); - case Attributes::SubjectsPerAccessControlEntry::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, subjectsPerAccessControlEntry); - case Attributes::TargetsPerAccessControlEntry::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, targetsPerAccessControlEntry); - case Attributes::AccessControlEntriesPerFabric::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, accessControlEntriesPerFabric); + case Attributes::DataModelRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, dataModelRevision); + case Attributes::VendorName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorName); + case Attributes::VendorID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorID); + case Attributes::ProductName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productName); + case Attributes::ProductID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productID); + case Attributes::NodeLabel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nodeLabel); + case Attributes::Location::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, location); + case Attributes::HardwareVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hardwareVersion); + case Attributes::HardwareVersionString::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hardwareVersionString); + case Attributes::SoftwareVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, softwareVersion); + case Attributes::SoftwareVersionString::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, softwareVersionString); + case Attributes::ManufacturingDate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, manufacturingDate); + case Attributes::PartNumber::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, partNumber); + case Attributes::ProductURL::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productURL); + case Attributes::ProductLabel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productLabel); + case Attributes::SerialNumber::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, serialNumber); + case Attributes::LocalConfigDisabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, localConfigDisabled); + case Attributes::Reachable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, reachable); + case Attributes::UniqueID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uniqueID); + case Attributes::CapabilityMinima::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, capabilityMinima); + case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productAppearance); + case Attributes::SpecificationVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, specificationVersion); + case Attributes::MaxPathsPerInvoke::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPathsPerInvoke); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -3177,16 +3135,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace AccessControlEntryChanged { +namespace StartUp { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); - ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); return aWriter.EndContainer(outer); } @@ -3204,23 +3158,63 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAdminNodeID)) + if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, adminNodeID); + err = DataModel::Decode(reader, softwareVersion); } - else if (__context_tag == to_underlying(Fields::kAdminPasscodeID)) + else { - err = DataModel::Decode(reader, adminPasscodeID); } - else if (__context_tag == to_underlying(Fields::kChangeType)) + + ReturnErrorOnFailure(err); + } +} +} // namespace StartUp. +namespace ShutDown { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, changeType); + return std::get(__element); } - else if (__context_tag == to_underlying(Fields::kLatestValue)) + } +} +} // namespace ShutDown. +namespace Leave { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, latestValue); + return std::get(__element); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kFabricIndex)) { err = DataModel::Decode(reader, fabricIndex); } @@ -3231,17 +3225,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AccessControlEntryChanged. -namespace AccessControlExtensionChanged { +} // namespace Leave. +namespace ReachableChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminNodeID), adminNodeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAdminPasscodeID), adminPasscodeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kChangeType), changeType)); - ReturnErrorOnFailure(DataModel::EncodeForRead(aWriter, TLV::ContextTag(Fields::kLatestValue), GetFabricIndex(), latestValue)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); return aWriter.EndContainer(outer); } @@ -3259,25 +3249,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAdminNodeID)) - { - err = DataModel::Decode(reader, adminNodeID); - } - else if (__context_tag == to_underlying(Fields::kAdminPasscodeID)) - { - err = DataModel::Decode(reader, adminPasscodeID); - } - else if (__context_tag == to_underlying(Fields::kChangeType)) - { - err = DataModel::Decode(reader, changeType); - } - else if (__context_tag == to_underlying(Fields::kLatestValue)) - { - err = DataModel::Decode(reader, latestValue); - } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + if (__context_tag == to_underlying(Fields::kReachableNewValue)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, reachableNewValue); } else { @@ -3286,23 +3260,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AccessControlExtensionChanged. +} // namespace ReachableChanged. } // namespace Events -} // namespace AccessControl -namespace Actions { -namespace Structs { +} // namespace BasicInformation +namespace OtaSoftwareUpdateProvider { -namespace ActionStruct { +namespace Commands { +namespace QueryImage { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kType), type); - encoder.Encode(to_underlying(Fields::kEndpointListID), endpointListID); - encoder.Encode(to_underlying(Fields::kSupportedCommands), supportedCommands); - encoder.Encode(to_underlying(Fields::kState), state); + encoder.Encode(to_underlying(Fields::kVendorID), vendorID); + encoder.Encode(to_underlying(Fields::kProductID), productID); + encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); + encoder.Encode(to_underlying(Fields::kProtocolsSupported), protocolsSupported); + encoder.Encode(to_underlying(Fields::kHardwareVersion), hardwareVersion); + encoder.Encode(to_underlying(Fields::kLocation), location); + encoder.Encode(to_underlying(Fields::kRequestorCanConsent), requestorCanConsent); + encoder.Encode(to_underlying(Fields::kMetadataForProvider), metadataForProvider); return encoder.Finalize(); } @@ -3320,29 +3296,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kVendorID)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, vendorID); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kProductID)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, productID); } - else if (__context_tag == to_underlying(Fields::kType)) + else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, type); + err = DataModel::Decode(reader, softwareVersion); } - else if (__context_tag == to_underlying(Fields::kEndpointListID)) + else if (__context_tag == to_underlying(Fields::kProtocolsSupported)) { - err = DataModel::Decode(reader, endpointListID); + err = DataModel::Decode(reader, protocolsSupported); } - else if (__context_tag == to_underlying(Fields::kSupportedCommands)) + else if (__context_tag == to_underlying(Fields::kHardwareVersion)) { - err = DataModel::Decode(reader, supportedCommands); + err = DataModel::Decode(reader, hardwareVersion); } - else if (__context_tag == to_underlying(Fields::kState)) + else if (__context_tag == to_underlying(Fields::kLocation)) { - err = DataModel::Decode(reader, state); + err = DataModel::Decode(reader, location); + } + else if (__context_tag == to_underlying(Fields::kRequestorCanConsent)) + { + err = DataModel::Decode(reader, requestorCanConsent); + } + else if (__context_tag == to_underlying(Fields::kMetadataForProvider)) + { + err = DataModel::Decode(reader, metadataForProvider); } else { @@ -3351,17 +3335,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ActionStruct - -namespace EndpointListStruct { +} // namespace QueryImage. +namespace QueryImageResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kEndpointListID), endpointListID); - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kType), type); - encoder.Encode(to_underlying(Fields::kEndpoints), endpoints); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kDelayedActionTime), delayedActionTime); + encoder.Encode(to_underlying(Fields::kImageURI), imageURI); + encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); + encoder.Encode(to_underlying(Fields::kSoftwareVersionString), softwareVersionString); + encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); + encoder.Encode(to_underlying(Fields::kUserConsentNeeded), userConsentNeeded); + encoder.Encode(to_underlying(Fields::kMetadataForRequestor), metadataForRequestor); return encoder.Finalize(); } @@ -3379,21 +3365,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kEndpointListID)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, endpointListID); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kDelayedActionTime)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, delayedActionTime); } - else if (__context_tag == to_underlying(Fields::kType)) + else if (__context_tag == to_underlying(Fields::kImageURI)) { - err = DataModel::Decode(reader, type); + err = DataModel::Decode(reader, imageURI); } - else if (__context_tag == to_underlying(Fields::kEndpoints)) + else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, endpoints); + err = DataModel::Decode(reader, softwareVersion); + } + else if (__context_tag == to_underlying(Fields::kSoftwareVersionString)) + { + err = DataModel::Decode(reader, softwareVersionString); + } + else if (__context_tag == to_underlying(Fields::kUpdateToken)) + { + err = DataModel::Decode(reader, updateToken); + } + else if (__context_tag == to_underlying(Fields::kUserConsentNeeded)) + { + err = DataModel::Decode(reader, userConsentNeeded); + } + else if (__context_tag == to_underlying(Fields::kMetadataForRequestor)) + { + err = DataModel::Decode(reader, metadataForRequestor); } else { @@ -3402,17 +3404,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace EndpointListStruct -} // namespace Structs - -namespace Commands { -namespace InstantAction { +} // namespace QueryImageResponse. +namespace ApplyUpdateRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); + encoder.Encode(to_underlying(Fields::kNewVersion), newVersion); return encoder.Finalize(); } @@ -3430,13 +3428,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kUpdateToken)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, updateToken); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kNewVersion)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, newVersion); } else { @@ -3445,14 +3443,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InstantAction. -namespace InstantActionWithTransition { +} // namespace ApplyUpdateRequest. +namespace ApplyUpdateResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kAction), action); + encoder.Encode(to_underlying(Fields::kDelayedActionTime), delayedActionTime); return encoder.Finalize(); } @@ -3470,17 +3467,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) - { - err = DataModel::Decode(reader, actionID); - } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + if (__context_tag == to_underlying(Fields::kAction)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, action); } - else if (__context_tag == to_underlying(Fields::kTransitionTime)) + else if (__context_tag == to_underlying(Fields::kDelayedActionTime)) { - err = DataModel::Decode(reader, transitionTime); + err = DataModel::Decode(reader, delayedActionTime); } else { @@ -3489,13 +3482,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InstantActionWithTransition. -namespace StartAction { +} // namespace ApplyUpdateResponse. +namespace NotifyUpdateApplied { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); + encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); return encoder.Finalize(); } @@ -3513,13 +3506,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kUpdateToken)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, updateToken); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, softwareVersion); } else { @@ -3528,14 +3521,61 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StartAction. -namespace StartActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +} // namespace NotifyUpdateApplied. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { +namespace Structs { + +namespace ProviderLocation { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - encoder.Encode(to_underlying(Fields::kDuration), duration); + + encoder.Encode(to_underlying(Fields::kProviderNodeID), providerNodeID); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -3553,17 +3593,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kProviderNodeID)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, providerNodeID); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kEndpoint)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, endpoint); } - else if (__context_tag == to_underlying(Fields::kDuration)) + else if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, duration); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -3572,13 +3612,20 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StartActionWithDuration. -namespace StopAction { + +} // namespace ProviderLocation +} // namespace Structs + +namespace Commands { +namespace AnnounceOTAProvider { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kProviderNodeID), providerNodeID); + encoder.Encode(to_underlying(Fields::kVendorID), vendorID); + encoder.Encode(to_underlying(Fields::kAnnouncementReason), announcementReason); + encoder.Encode(to_underlying(Fields::kMetadataForNode), metadataForNode); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); return encoder.Finalize(); } @@ -3596,13 +3643,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kProviderNodeID)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, providerNodeID); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kVendorID)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, vendorID); + } + else if (__context_tag == to_underlying(Fields::kAnnouncementReason)) + { + err = DataModel::Decode(reader, announcementReason); + } + else if (__context_tag == to_underlying(Fields::kMetadataForNode)) + { + err = DataModel::Decode(reader, metadataForNode); + } + else if (__context_tag == to_underlying(Fields::kEndpoint)) + { + err = DataModel::Decode(reader, endpoint); } else { @@ -3611,14 +3670,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StopAction. -namespace PauseAction { +} // namespace AnnounceOTAProvider. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::DefaultOTAProviders::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultOTAProviders); + case Attributes::UpdatePossible::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, updatePossible); + case Attributes::UpdateState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, updateState); + case Attributes::UpdateStateProgress::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, updateStateProgress); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace StateTransition { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousState), previousState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReason), reason)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetSoftwareVersion), targetSoftwareVersion)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -3635,13 +3731,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kPreviousState)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, previousState); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kNewState)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, newState); + } + else if (__context_tag == to_underlying(Fields::kReason)) + { + err = DataModel::Decode(reader, reason); + } + else if (__context_tag == to_underlying(Fields::kTargetSoftwareVersion)) + { + err = DataModel::Decode(reader, targetSoftwareVersion); } else { @@ -3650,15 +3754,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace PauseAction. -namespace PauseActionWithDuration { +} // namespace StateTransition. +namespace VersionApplied { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - encoder.Encode(to_underlying(Fields::kDuration), duration); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProductID), productID)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -3675,17 +3779,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) - { - err = DataModel::Decode(reader, actionID); - } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, softwareVersion); } - else if (__context_tag == to_underlying(Fields::kDuration)) + else if (__context_tag == to_underlying(Fields::kProductID)) { - err = DataModel::Decode(reader, duration); + err = DataModel::Decode(reader, productID); } else { @@ -3694,14 +3794,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace PauseActionWithDuration. -namespace ResumeAction { +} // namespace VersionApplied. +namespace DownloadError { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBytesDownloaded), bytesDownloaded)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProgressPercent), progressPercent)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPlatformCode), platformCode)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -3718,13 +3821,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, softwareVersion); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kBytesDownloaded)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, bytesDownloaded); + } + else if (__context_tag == to_underlying(Fields::kProgressPercent)) + { + err = DataModel::Decode(reader, progressPercent); + } + else if (__context_tag == to_underlying(Fields::kPlatformCode)) + { + err = DataModel::Decode(reader, platformCode); } else { @@ -3733,13 +3844,153 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ResumeAction. -namespace EnableAction { +} // namespace DownloadError. +} // namespace Events + +} // namespace OtaSoftwareUpdateRequestor +namespace LocalizationConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::ActiveLocale::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeLocale); + case Attributes::SupportedLocales::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedLocales); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace LocalizationConfiguration +namespace TimeFormatLocalization { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::HourFormat::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hourFormat); + case Attributes::ActiveCalendarType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeCalendarType); + case Attributes::SupportedCalendarTypes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedCalendarTypes); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace TimeFormatLocalization +namespace UnitLocalization { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::TemperatureUnit::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureUnit); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace UnitLocalization +namespace PowerSourceConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Sources::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sources); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace PowerSourceConfiguration +namespace PowerSource { +namespace Structs { + +namespace BatChargeFaultChangeType { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kCurrent), current); + encoder.Encode(to_underlying(Fields::kPrevious), previous); return encoder.Finalize(); } @@ -3757,13 +4008,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, previous); } else { @@ -3772,14 +4023,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnableAction. -namespace EnableActionWithDuration { + +} // namespace BatChargeFaultChangeType + +namespace BatFaultChangeType { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - encoder.Encode(to_underlying(Fields::kDuration), duration); + encoder.Encode(to_underlying(Fields::kCurrent), current); + encoder.Encode(to_underlying(Fields::kPrevious), previous); return encoder.Finalize(); } @@ -3797,17 +4049,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) - { - err = DataModel::Decode(reader, actionID); - } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kDuration)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, duration); + err = DataModel::Decode(reader, previous); } else { @@ -3816,13 +4064,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace EnableActionWithDuration. -namespace DisableAction { + +} // namespace BatFaultChangeType + +namespace WiredFaultChangeType { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); + encoder.Encode(to_underlying(Fields::kCurrent), current); + encoder.Encode(to_underlying(Fields::kPrevious), previous); return encoder.Finalize(); } @@ -3840,13 +4090,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, previous); } else { @@ -3855,64 +4105,81 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DisableAction. -namespace DisableActionWithDuration { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActionID), actionID); - encoder.Encode(to_underlying(Fields::kInvokeID), invokeID); - encoder.Encode(to_underlying(Fields::kDuration), duration); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) - { - err = DataModel::Decode(reader, actionID); - } - else if (__context_tag == to_underlying(Fields::kInvokeID)) - { - err = DataModel::Decode(reader, invokeID); - } - else if (__context_tag == to_underlying(Fields::kDuration)) - { - err = DataModel::Decode(reader, duration); - } - else - { - } +} // namespace WiredFaultChangeType +} // namespace Structs - ReturnErrorOnFailure(err); - } -} -} // namespace DisableActionWithDuration. -} // namespace Commands +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::ActionList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, actionList); - case Attributes::EndpointLists::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, endpointLists); - case Attributes::SetupURL::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, setupURL); + case Attributes::Status::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, status); + case Attributes::Order::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, order); + case Attributes::Description::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, description); + case Attributes::WiredAssessedInputVoltage::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredAssessedInputVoltage); + case Attributes::WiredAssessedInputFrequency::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredAssessedInputFrequency); + case Attributes::WiredCurrentType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredCurrentType); + case Attributes::WiredAssessedCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredAssessedCurrent); + case Attributes::WiredNominalVoltage::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredNominalVoltage); + case Attributes::WiredMaximumCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredMaximumCurrent); + case Attributes::WiredPresent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiredPresent); + case Attributes::ActiveWiredFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeWiredFaults); + case Attributes::BatVoltage::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batVoltage); + case Attributes::BatPercentRemaining::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batPercentRemaining); + case Attributes::BatTimeRemaining::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batTimeRemaining); + case Attributes::BatChargeLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batChargeLevel); + case Attributes::BatReplacementNeeded::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batReplacementNeeded); + case Attributes::BatReplaceability::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batReplaceability); + case Attributes::BatPresent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batPresent); + case Attributes::ActiveBatFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeBatFaults); + case Attributes::BatReplacementDescription::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batReplacementDescription); + case Attributes::BatCommonDesignation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batCommonDesignation); + case Attributes::BatANSIDesignation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batANSIDesignation); + case Attributes::BatIECDesignation::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batIECDesignation); + case Attributes::BatApprovedChemistry::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batApprovedChemistry); + case Attributes::BatCapacity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batCapacity); + case Attributes::BatQuantity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batQuantity); + case Attributes::BatChargeState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batChargeState); + case Attributes::BatTimeToFullCharge::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batTimeToFullCharge); + case Attributes::BatFunctionalWhileCharging::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batFunctionalWhileCharging); + case Attributes::BatChargingCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batChargingCurrent); + case Attributes::ActiveBatChargeFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeBatChargeFaults); + case Attributes::EndpointList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, endpointList); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -3932,14 +4199,13 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace StateChanged { +namespace WiredFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); return aWriter.EndContainer(outer); } @@ -3957,17 +4223,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) - { - err = DataModel::Decode(reader, actionID); - } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kNewState)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, newState); + err = DataModel::Decode(reader, previous); } else { @@ -3976,16 +4238,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StateChanged. -namespace ActionFailed { +} // namespace WiredFaultChange. +namespace BatFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActionID), actionID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInvokeID), invokeID)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kError), error)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); return aWriter.EndContainer(outer); } @@ -4003,21 +4263,53 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActionID)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, actionID); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kInvokeID)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, invokeID); + err = DataModel::Decode(reader, previous); } - else if (__context_tag == to_underlying(Fields::kNewState)) + else { - err = DataModel::Decode(reader, newState); } - else if (__context_tag == to_underlying(Fields::kError)) + + ReturnErrorOnFailure(err); + } +} +} // namespace BatFaultChange. +namespace BatChargeFaultChange { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, error); + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kCurrent)) + { + err = DataModel::Decode(reader, current); + } + else if (__context_tag == to_underlying(Fields::kPrevious)) + { + err = DataModel::Decode(reader, previous); } else { @@ -4026,19 +4318,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ActionFailed. +} // namespace BatChargeFaultChange. } // namespace Events -} // namespace Actions -namespace BasicInformation { +} // namespace PowerSource +namespace GeneralCommissioning { namespace Structs { -namespace CapabilityMinimaStruct { +namespace BasicCommissioningInfo { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCaseSessionsPerFabric), caseSessionsPerFabric); - encoder.Encode(to_underlying(Fields::kSubscriptionsPerFabric), subscriptionsPerFabric); + encoder.Encode(to_underlying(Fields::kFailSafeExpiryLengthSeconds), failSafeExpiryLengthSeconds); + encoder.Encode(to_underlying(Fields::kMaxCumulativeFailsafeSeconds), maxCumulativeFailsafeSeconds); return encoder.Finalize(); } @@ -4056,13 +4348,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCaseSessionsPerFabric)) + if (__context_tag == to_underlying(Fields::kFailSafeExpiryLengthSeconds)) { - err = DataModel::Decode(reader, caseSessionsPerFabric); + err = DataModel::Decode(reader, failSafeExpiryLengthSeconds); } - else if (__context_tag == to_underlying(Fields::kSubscriptionsPerFabric)) + else if (__context_tag == to_underlying(Fields::kMaxCumulativeFailsafeSeconds)) { - err = DataModel::Decode(reader, subscriptionsPerFabric); + err = DataModel::Decode(reader, maxCumulativeFailsafeSeconds); } else { @@ -4072,14 +4364,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace CapabilityMinimaStruct +} // namespace BasicCommissioningInfo +} // namespace Structs -namespace ProductAppearanceStruct { +namespace Commands { +namespace ArmFailSafe { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFinish), finish); - encoder.Encode(to_underlying(Fields::kPrimaryColor), primaryColor); + encoder.Encode(to_underlying(Fields::kExpiryLengthSeconds), expiryLengthSeconds); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); return encoder.Finalize(); } @@ -4097,13 +4391,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFinish)) + if (__context_tag == to_underlying(Fields::kExpiryLengthSeconds)) { - err = DataModel::Decode(reader, finish); + err = DataModel::Decode(reader, expiryLengthSeconds); } - else if (__context_tag == to_underlying(Fields::kPrimaryColor)) + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) { - err = DataModel::Decode(reader, primaryColor); + err = DataModel::Decode(reader, breadcrumb); } else { @@ -4112,15 +4406,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ProductAppearanceStruct -} // namespace Structs - -namespace Commands { -namespace MfgSpecificPing { +} // namespace ArmFailSafe. +namespace ArmFailSafeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); return encoder.Finalize(); } @@ -4134,88 +4426,77 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kErrorCode)) + { + err = DataModel::Decode(reader, errorCode); + } + else if (__context_tag == to_underlying(Fields::kDebugText)) + { + err = DataModel::Decode(reader, debugText); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace MfgSpecificPing. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +} // namespace ArmFailSafeResponse. +namespace SetRegulatoryConfig { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewRegulatoryConfig), newRegulatoryConfig); + encoder.Encode(to_underlying(Fields::kCountryCode), countryCode); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::DataModelRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dataModelRevision); - case Attributes::VendorName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorName); - case Attributes::VendorID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorID); - case Attributes::ProductName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productName); - case Attributes::ProductID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productID); - case Attributes::NodeLabel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, nodeLabel); - case Attributes::Location::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, location); - case Attributes::HardwareVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hardwareVersion); - case Attributes::HardwareVersionString::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hardwareVersionString); - case Attributes::SoftwareVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, softwareVersion); - case Attributes::SoftwareVersionString::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, softwareVersionString); - case Attributes::ManufacturingDate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, manufacturingDate); - case Attributes::PartNumber::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, partNumber); - case Attributes::ProductURL::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productURL); - case Attributes::ProductLabel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productLabel); - case Attributes::SerialNumber::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, serialNumber); - case Attributes::LocalConfigDisabled::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, localConfigDisabled); - case Attributes::Reachable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reachable); - case Attributes::UniqueID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uniqueID); - case Attributes::CapabilityMinima::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, capabilityMinima); - case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productAppearance); - case Attributes::SpecificationVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, specificationVersion); - case Attributes::MaxPathsPerInvoke::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxPathsPerInvoke); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNewRegulatoryConfig)) + { + err = DataModel::Decode(reader, newRegulatoryConfig); + } + else if (__context_tag == to_underlying(Fields::kCountryCode)) + { + err = DataModel::Decode(reader, countryCode); + } + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + { + err = DataModel::Decode(reader, breadcrumb); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events { -namespace StartUp { +} // namespace SetRegulatoryConfig. +namespace SetRegulatoryConfigResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4232,9 +4513,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + if (__context_tag == to_underlying(Fields::kErrorCode)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, errorCode); + } + else if (__context_tag == to_underlying(Fields::kDebugText)) + { + err = DataModel::Decode(reader, debugText); } else { @@ -4243,13 +4528,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StartUp. -namespace ShutDown { +} // namespace SetRegulatoryConfigResponse. +namespace CommissioningComplete { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4264,14 +4548,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace ShutDown. -namespace Leave { +} // namespace CommissioningComplete. +namespace CommissioningCompleteResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4288,9 +4572,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFabricIndex)) + if (__context_tag == to_underlying(Fields::kErrorCode)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, errorCode); + } + else if (__context_tag == to_underlying(Fields::kDebugText)) + { + err = DataModel::Decode(reader, debugText); } else { @@ -4299,14 +4587,57 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Leave. -namespace ReachableChanged { +} // namespace CommissioningCompleteResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Breadcrumb::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, breadcrumb); + case Attributes::BasicCommissioningInfo::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, basicCommissioningInfo); + case Attributes::RegulatoryConfig::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, regulatoryConfig); + case Attributes::LocationCapability::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, locationCapability); + case Attributes::SupportsConcurrentConnection::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportsConcurrentConnection); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +namespace Structs { + +namespace NetworkInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNetworkID), networkID); + encoder.Encode(to_underlying(Fields::kConnected), connected); + encoder.Encode(to_underlying(Fields::kNetworkIdentifier), networkIdentifier); + encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4323,9 +4654,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kReachableNewValue)) + if (__context_tag == to_underlying(Fields::kNetworkID)) { - err = DataModel::Decode(reader, reachableNewValue); + err = DataModel::Decode(reader, networkID); + } + else if (__context_tag == to_underlying(Fields::kConnected)) + { + err = DataModel::Decode(reader, connected); + } + else if (__context_tag == to_underlying(Fields::kNetworkIdentifier)) + { + err = DataModel::Decode(reader, networkIdentifier); + } + else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + { + err = DataModel::Decode(reader, clientIdentifier); } else { @@ -4334,25 +4677,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ReachableChanged. -} // namespace Events -} // namespace BasicInformation -namespace OtaSoftwareUpdateProvider { +} // namespace NetworkInfoStruct -namespace Commands { -namespace QueryImage { +namespace ThreadInterfaceScanResultStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kVendorID), vendorID); - encoder.Encode(to_underlying(Fields::kProductID), productID); - encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); - encoder.Encode(to_underlying(Fields::kProtocolsSupported), protocolsSupported); - encoder.Encode(to_underlying(Fields::kHardwareVersion), hardwareVersion); - encoder.Encode(to_underlying(Fields::kLocation), location); - encoder.Encode(to_underlying(Fields::kRequestorCanConsent), requestorCanConsent); - encoder.Encode(to_underlying(Fields::kMetadataForProvider), metadataForProvider); + encoder.Encode(to_underlying(Fields::kPanId), panId); + encoder.Encode(to_underlying(Fields::kExtendedPanId), extendedPanId); + encoder.Encode(to_underlying(Fields::kNetworkName), networkName); + encoder.Encode(to_underlying(Fields::kChannel), channel); + encoder.Encode(to_underlying(Fields::kVersion), version); + encoder.Encode(to_underlying(Fields::kExtendedAddress), extendedAddress); + encoder.Encode(to_underlying(Fields::kRssi), rssi); + encoder.Encode(to_underlying(Fields::kLqi), lqi); return encoder.Finalize(); } @@ -4370,37 +4709,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kVendorID)) + if (__context_tag == to_underlying(Fields::kPanId)) { - err = DataModel::Decode(reader, vendorID); + err = DataModel::Decode(reader, panId); } - else if (__context_tag == to_underlying(Fields::kProductID)) + else if (__context_tag == to_underlying(Fields::kExtendedPanId)) { - err = DataModel::Decode(reader, productID); + err = DataModel::Decode(reader, extendedPanId); } - else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + else if (__context_tag == to_underlying(Fields::kNetworkName)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, networkName); } - else if (__context_tag == to_underlying(Fields::kProtocolsSupported)) + else if (__context_tag == to_underlying(Fields::kChannel)) { - err = DataModel::Decode(reader, protocolsSupported); + err = DataModel::Decode(reader, channel); } - else if (__context_tag == to_underlying(Fields::kHardwareVersion)) + else if (__context_tag == to_underlying(Fields::kVersion)) { - err = DataModel::Decode(reader, hardwareVersion); + err = DataModel::Decode(reader, version); } - else if (__context_tag == to_underlying(Fields::kLocation)) + else if (__context_tag == to_underlying(Fields::kExtendedAddress)) { - err = DataModel::Decode(reader, location); + err = DataModel::Decode(reader, extendedAddress); } - else if (__context_tag == to_underlying(Fields::kRequestorCanConsent)) + else if (__context_tag == to_underlying(Fields::kRssi)) { - err = DataModel::Decode(reader, requestorCanConsent); + err = DataModel::Decode(reader, rssi); } - else if (__context_tag == to_underlying(Fields::kMetadataForProvider)) + else if (__context_tag == to_underlying(Fields::kLqi)) { - err = DataModel::Decode(reader, metadataForProvider); + err = DataModel::Decode(reader, lqi); } else { @@ -4409,19 +4748,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace QueryImage. -namespace QueryImageResponse { + +} // namespace ThreadInterfaceScanResultStruct + +namespace WiFiInterfaceScanResultStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kDelayedActionTime), delayedActionTime); - encoder.Encode(to_underlying(Fields::kImageURI), imageURI); - encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); - encoder.Encode(to_underlying(Fields::kSoftwareVersionString), softwareVersionString); - encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); - encoder.Encode(to_underlying(Fields::kUserConsentNeeded), userConsentNeeded); - encoder.Encode(to_underlying(Fields::kMetadataForRequestor), metadataForRequestor); + encoder.Encode(to_underlying(Fields::kSecurity), security); + encoder.Encode(to_underlying(Fields::kSsid), ssid); + encoder.Encode(to_underlying(Fields::kBssid), bssid); + encoder.Encode(to_underlying(Fields::kChannel), channel); + encoder.Encode(to_underlying(Fields::kWiFiBand), wiFiBand); + encoder.Encode(to_underlying(Fields::kRssi), rssi); return encoder.Finalize(); } @@ -4439,37 +4778,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kDelayedActionTime)) - { - err = DataModel::Decode(reader, delayedActionTime); - } - else if (__context_tag == to_underlying(Fields::kImageURI)) + if (__context_tag == to_underlying(Fields::kSecurity)) { - err = DataModel::Decode(reader, imageURI); + err = DataModel::Decode(reader, security); } - else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + else if (__context_tag == to_underlying(Fields::kSsid)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, ssid); } - else if (__context_tag == to_underlying(Fields::kSoftwareVersionString)) + else if (__context_tag == to_underlying(Fields::kBssid)) { - err = DataModel::Decode(reader, softwareVersionString); + err = DataModel::Decode(reader, bssid); } - else if (__context_tag == to_underlying(Fields::kUpdateToken)) + else if (__context_tag == to_underlying(Fields::kChannel)) { - err = DataModel::Decode(reader, updateToken); + err = DataModel::Decode(reader, channel); } - else if (__context_tag == to_underlying(Fields::kUserConsentNeeded)) + else if (__context_tag == to_underlying(Fields::kWiFiBand)) { - err = DataModel::Decode(reader, userConsentNeeded); + err = DataModel::Decode(reader, wiFiBand); } - else if (__context_tag == to_underlying(Fields::kMetadataForRequestor)) + else if (__context_tag == to_underlying(Fields::kRssi)) { - err = DataModel::Decode(reader, metadataForRequestor); + err = DataModel::Decode(reader, rssi); } else { @@ -4478,13 +4809,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace QueryImageResponse. -namespace ApplyUpdateRequest { + +} // namespace WiFiInterfaceScanResultStruct +} // namespace Structs + +namespace Commands { +namespace ScanNetworks { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); - encoder.Encode(to_underlying(Fields::kNewVersion), newVersion); + encoder.Encode(to_underlying(Fields::kSsid), ssid); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); return encoder.Finalize(); } @@ -4502,13 +4837,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kUpdateToken)) + if (__context_tag == to_underlying(Fields::kSsid)) { - err = DataModel::Decode(reader, updateToken); + err = DataModel::Decode(reader, ssid); } - else if (__context_tag == to_underlying(Fields::kNewVersion)) + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) { - err = DataModel::Decode(reader, newVersion); + err = DataModel::Decode(reader, breadcrumb); } else { @@ -4517,13 +4852,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ApplyUpdateRequest. -namespace ApplyUpdateResponse { +} // namespace ScanNetworks. +namespace ScanNetworksResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAction), action); - encoder.Encode(to_underlying(Fields::kDelayedActionTime), delayedActionTime); + encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + encoder.Encode(to_underlying(Fields::kWiFiScanResults), wiFiScanResults); + encoder.Encode(to_underlying(Fields::kThreadScanResults), threadScanResults); return encoder.Finalize(); } @@ -4541,13 +4878,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAction)) + if (__context_tag == to_underlying(Fields::kNetworkingStatus)) { - err = DataModel::Decode(reader, action); + err = DataModel::Decode(reader, networkingStatus); } - else if (__context_tag == to_underlying(Fields::kDelayedActionTime)) + else if (__context_tag == to_underlying(Fields::kDebugText)) { - err = DataModel::Decode(reader, delayedActionTime); + err = DataModel::Decode(reader, debugText); + } + else if (__context_tag == to_underlying(Fields::kWiFiScanResults)) + { + err = DataModel::Decode(reader, wiFiScanResults); + } + else if (__context_tag == to_underlying(Fields::kThreadScanResults)) + { + err = DataModel::Decode(reader, threadScanResults); } else { @@ -4556,13 +4901,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ApplyUpdateResponse. -namespace NotifyUpdateApplied { +} // namespace ScanNetworksResponse. +namespace AddOrUpdateWiFiNetwork { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUpdateToken), updateToken); - encoder.Encode(to_underlying(Fields::kSoftwareVersion), softwareVersion); + encoder.Encode(to_underlying(Fields::kSsid), ssid); + encoder.Encode(to_underlying(Fields::kCredentials), credentials); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + encoder.Encode(to_underlying(Fields::kNetworkIdentity), networkIdentity); + encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); + encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); return encoder.Finalize(); } @@ -4580,13 +4929,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kUpdateToken)) + if (__context_tag == to_underlying(Fields::kSsid)) { - err = DataModel::Decode(reader, updateToken); + err = DataModel::Decode(reader, ssid); } - else if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + else if (__context_tag == to_underlying(Fields::kCredentials)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, credentials); + } + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + { + err = DataModel::Decode(reader, breadcrumb); + } + else if (__context_tag == to_underlying(Fields::kNetworkIdentity)) + { + err = DataModel::Decode(reader, networkIdentity); + } + else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + { + err = DataModel::Decode(reader, clientIdentifier); + } + else if (__context_tag == to_underlying(Fields::kPossessionNonce)) + { + err = DataModel::Decode(reader, possessionNonce); } else { @@ -4595,61 +4960,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace NotifyUpdateApplied. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace OtaSoftwareUpdateProvider -namespace OtaSoftwareUpdateRequestor { -namespace Structs { - -namespace ProviderLocation { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} - -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +} // namespace AddOrUpdateWiFiNetwork. +namespace AddOrUpdateThreadNetwork { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - encoder.Encode(to_underlying(Fields::kProviderNodeID), providerNodeID); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - + encoder.Encode(to_underlying(Fields::kOperationalDataset), operationalDataset); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); return encoder.Finalize(); } @@ -4667,17 +4984,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kProviderNodeID)) - { - err = DataModel::Decode(reader, providerNodeID); - } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + if (__context_tag == to_underlying(Fields::kOperationalDataset)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, operationalDataset); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, breadcrumb); } else { @@ -4686,20 +4999,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ProviderLocation -} // namespace Structs - -namespace Commands { -namespace AnnounceOTAProvider { +} // namespace AddOrUpdateThreadNetwork. +namespace RemoveNetwork { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kProviderNodeID), providerNodeID); - encoder.Encode(to_underlying(Fields::kVendorID), vendorID); - encoder.Encode(to_underlying(Fields::kAnnouncementReason), announcementReason); - encoder.Encode(to_underlying(Fields::kMetadataForNode), metadataForNode); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); + encoder.Encode(to_underlying(Fields::kNetworkID), networkID); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); return encoder.Finalize(); } @@ -4717,25 +5023,67 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kProviderNodeID)) + if (__context_tag == to_underlying(Fields::kNetworkID)) { - err = DataModel::Decode(reader, providerNodeID); + err = DataModel::Decode(reader, networkID); } - else if (__context_tag == to_underlying(Fields::kVendorID)) + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) { - err = DataModel::Decode(reader, vendorID); + err = DataModel::Decode(reader, breadcrumb); } - else if (__context_tag == to_underlying(Fields::kAnnouncementReason)) + else { - err = DataModel::Decode(reader, announcementReason); } - else if (__context_tag == to_underlying(Fields::kMetadataForNode)) + + ReturnErrorOnFailure(err); + } +} +} // namespace RemoveNetwork. +namespace NetworkConfigResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + encoder.Encode(to_underlying(Fields::kNetworkIndex), networkIndex); + encoder.Encode(to_underlying(Fields::kClientIdentity), clientIdentity); + encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, metadataForNode); + return std::get(__element); } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNetworkingStatus)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, networkingStatus); + } + else if (__context_tag == to_underlying(Fields::kDebugText)) + { + err = DataModel::Decode(reader, debugText); + } + else if (__context_tag == to_underlying(Fields::kNetworkIndex)) + { + err = DataModel::Decode(reader, networkIndex); + } + else if (__context_tag == to_underlying(Fields::kClientIdentity)) + { + err = DataModel::Decode(reader, clientIdentity); + } + else if (__context_tag == to_underlying(Fields::kPossessionSignature)) + { + err = DataModel::Decode(reader, possessionSignature); } else { @@ -4744,51 +5092,54 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AnnounceOTAProvider. -} // namespace Commands +} // namespace NetworkConfigResponse. +namespace ConnectNetwork { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNetworkID), networkID); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::DefaultOTAProviders::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, defaultOTAProviders); - case Attributes::UpdatePossible::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, updatePossible); - case Attributes::UpdateState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, updateState); - case Attributes::UpdateStateProgress::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, updateStateProgress); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNetworkID)) + { + err = DataModel::Decode(reader, networkID); + } + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + { + err = DataModel::Decode(reader, breadcrumb); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events { -namespace StateTransition { +} // namespace ConnectNetwork. +namespace ConnectNetworkResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousState), previousState)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewState), newState)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReason), reason)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTargetSoftwareVersion), targetSoftwareVersion)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + encoder.Encode(to_underlying(Fields::kErrorValue), errorValue); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4805,21 +5156,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPreviousState)) - { - err = DataModel::Decode(reader, previousState); - } - else if (__context_tag == to_underlying(Fields::kNewState)) + if (__context_tag == to_underlying(Fields::kNetworkingStatus)) { - err = DataModel::Decode(reader, newState); + err = DataModel::Decode(reader, networkingStatus); } - else if (__context_tag == to_underlying(Fields::kReason)) + else if (__context_tag == to_underlying(Fields::kDebugText)) { - err = DataModel::Decode(reader, reason); + err = DataModel::Decode(reader, debugText); } - else if (__context_tag == to_underlying(Fields::kTargetSoftwareVersion)) + else if (__context_tag == to_underlying(Fields::kErrorValue)) { - err = DataModel::Decode(reader, targetSoftwareVersion); + err = DataModel::Decode(reader, errorValue); } else { @@ -4828,15 +5175,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StateTransition. -namespace VersionApplied { +} // namespace ConnectNetworkResponse. +namespace ReorderNetwork { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProductID), productID)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNetworkID), networkID); + encoder.Encode(to_underlying(Fields::kNetworkIndex), networkIndex); + encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4853,13 +5200,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + if (__context_tag == to_underlying(Fields::kNetworkID)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, networkID); } - else if (__context_tag == to_underlying(Fields::kProductID)) + else if (__context_tag == to_underlying(Fields::kNetworkIndex)) { - err = DataModel::Decode(reader, productID); + err = DataModel::Decode(reader, networkIndex); + } + else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + { + err = DataModel::Decode(reader, breadcrumb); } else { @@ -4868,17 +5219,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace VersionApplied. -namespace DownloadError { +} // namespace ReorderNetwork. +namespace QueryIdentity { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBytesDownloaded), bytesDownloaded)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kProgressPercent), progressPercent)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPlatformCode), platformCode)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kKeyIdentifier), keyIdentifier); + encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -4895,21 +5243,52 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + if (__context_tag == to_underlying(Fields::kKeyIdentifier)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, keyIdentifier); } - else if (__context_tag == to_underlying(Fields::kBytesDownloaded)) + else if (__context_tag == to_underlying(Fields::kPossessionNonce)) { - err = DataModel::Decode(reader, bytesDownloaded); + err = DataModel::Decode(reader, possessionNonce); } - else if (__context_tag == to_underlying(Fields::kProgressPercent)) + else { - err = DataModel::Decode(reader, progressPercent); } - else if (__context_tag == to_underlying(Fields::kPlatformCode)) + + ReturnErrorOnFailure(err); + } +} +} // namespace QueryIdentity. +namespace QueryIdentityResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIdentity), identity); + encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, platformCode); + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kIdentity)) + { + err = DataModel::Decode(reader, identity); + } + else if (__context_tag == to_underlying(Fields::kPossessionSignature)) + { + err = DataModel::Decode(reader, possessionSignature); } else { @@ -4918,59 +5297,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DownloadError. -} // namespace Events - -} // namespace OtaSoftwareUpdateRequestor -namespace LocalizationConfiguration { - -namespace Commands {} // namespace Commands +} // namespace QueryIdentityResponse. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::ActiveLocale::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeLocale); - case Attributes::SupportedLocales::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedLocales); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace LocalizationConfiguration -namespace TimeFormatLocalization { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::HourFormat::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hourFormat); - case Attributes::ActiveCalendarType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeCalendarType); - case Attributes::SupportedCalendarTypes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedCalendarTypes); + case Attributes::MaxNetworks::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxNetworks); + case Attributes::Networks::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, networks); + case Attributes::ScanMaxTimeSeconds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scanMaxTimeSeconds); + case Attributes::ConnectMaxTimeSeconds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, connectMaxTimeSeconds); + case Attributes::InterfaceEnabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, interfaceEnabled); + case Attributes::LastNetworkingStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lastNetworkingStatus); + case Attributes::LastNetworkID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lastNetworkID); + case Attributes::LastConnectErrorValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lastConnectErrorValue); + case Attributes::SupportedWiFiBands::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedWiFiBands); + case Attributes::SupportedThreadFeatures::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedThreadFeatures); + case Attributes::ThreadVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, threadVersion); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -4991,50 +5347,110 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace TimeFormatLocalization -namespace UnitLocalization { +} // namespace NetworkCommissioning +namespace DiagnosticLogs { -namespace Commands {} // namespace Commands +namespace Commands { +namespace RetrieveLogsRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kIntent), intent); + encoder.Encode(to_underlying(Fields::kRequestedProtocol), requestedProtocol); + encoder.Encode(to_underlying(Fields::kTransferFileDesignator), transferFileDesignator); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::TemperatureUnit::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, temperatureUnit); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kIntent)) + { + err = DataModel::Decode(reader, intent); + } + else if (__context_tag == to_underlying(Fields::kRequestedProtocol)) + { + err = DataModel::Decode(reader, requestedProtocol); + } + else if (__context_tag == to_underlying(Fields::kTransferFileDesignator)) + { + err = DataModel::Decode(reader, transferFileDesignator); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace RetrieveLogsRequest. +namespace RetrieveLogsResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kLogContent), logContent); + encoder.Encode(to_underlying(Fields::kUTCTimeStamp), UTCTimeStamp); + encoder.Encode(to_underlying(Fields::kTimeSinceBoot), timeSinceBoot); + return encoder.Finalize(); +} -namespace Events {} // namespace Events +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -} // namespace UnitLocalization -namespace PowerSourceConfiguration { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kLogContent)) + { + err = DataModel::Decode(reader, logContent); + } + else if (__context_tag == to_underlying(Fields::kUTCTimeStamp)) + { + err = DataModel::Decode(reader, UTCTimeStamp); + } + else if (__context_tag == to_underlying(Fields::kTimeSinceBoot)) + { + err = DataModel::Decode(reader, timeSinceBoot); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace RetrieveLogsResponse. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::Sources::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, sources); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -5055,16 +5471,22 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace PowerSourceConfiguration -namespace PowerSource { +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { namespace Structs { -namespace BatChargeFaultChangeType { +namespace NetworkInterface { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCurrent), current); - encoder.Encode(to_underlying(Fields::kPrevious), previous); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kIsOperational), isOperational); + encoder.Encode(to_underlying(Fields::kOffPremiseServicesReachableIPv4), offPremiseServicesReachableIPv4); + encoder.Encode(to_underlying(Fields::kOffPremiseServicesReachableIPv6), offPremiseServicesReachableIPv6); + encoder.Encode(to_underlying(Fields::kHardwareAddress), hardwareAddress); + encoder.Encode(to_underlying(Fields::kIPv4Addresses), IPv4Addresses); + encoder.Encode(to_underlying(Fields::kIPv6Addresses), IPv6Addresses); + encoder.Encode(to_underlying(Fields::kType), type); return encoder.Finalize(); } @@ -5082,13 +5504,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCurrent)) + if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, current); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kPrevious)) + else if (__context_tag == to_underlying(Fields::kIsOperational)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, isOperational); + } + else if (__context_tag == to_underlying(Fields::kOffPremiseServicesReachableIPv4)) + { + err = DataModel::Decode(reader, offPremiseServicesReachableIPv4); + } + else if (__context_tag == to_underlying(Fields::kOffPremiseServicesReachableIPv6)) + { + err = DataModel::Decode(reader, offPremiseServicesReachableIPv6); + } + else if (__context_tag == to_underlying(Fields::kHardwareAddress)) + { + err = DataModel::Decode(reader, hardwareAddress); + } + else if (__context_tag == to_underlying(Fields::kIPv4Addresses)) + { + err = DataModel::Decode(reader, IPv4Addresses); + } + else if (__context_tag == to_underlying(Fields::kIPv6Addresses)) + { + err = DataModel::Decode(reader, IPv6Addresses); + } + else if (__context_tag == to_underlying(Fields::kType)) + { + err = DataModel::Decode(reader, type); } else { @@ -5098,14 +5544,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace BatChargeFaultChangeType +} // namespace NetworkInterface +} // namespace Structs -namespace BatFaultChangeType { +namespace Commands { +namespace TestEventTrigger { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCurrent), current); - encoder.Encode(to_underlying(Fields::kPrevious), previous); + encoder.Encode(to_underlying(Fields::kEnableKey), enableKey); + encoder.Encode(to_underlying(Fields::kEventTrigger), eventTrigger); return encoder.Finalize(); } @@ -5123,13 +5571,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCurrent)) + if (__context_tag == to_underlying(Fields::kEnableKey)) { - err = DataModel::Decode(reader, current); + err = DataModel::Decode(reader, enableKey); } - else if (__context_tag == to_underlying(Fields::kPrevious)) + else if (__context_tag == to_underlying(Fields::kEventTrigger)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, eventTrigger); } else { @@ -5138,15 +5586,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace BatFaultChangeType - -namespace WiredFaultChangeType { +} // namespace TestEventTrigger. +namespace TimeSnapshot { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCurrent), current); - encoder.Encode(to_underlying(Fields::kPrevious), previous); return encoder.Finalize(); } @@ -5160,17 +5604,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace TimeSnapshot. +namespace TimeSnapshotResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kSystemTimeMs), systemTimeMs); + encoder.Encode(to_underlying(Fields::kPosixTimeMs), posixTimeMs); + return encoder.Finalize(); +} - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kCurrent)) - { - err = DataModel::Decode(reader, current); +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); } - else if (__context_tag == to_underlying(Fields::kPrevious)) + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSystemTimeMs)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, systemTimeMs); + } + else if (__context_tag == to_underlying(Fields::kPosixTimeMs)) + { + err = DataModel::Decode(reader, posixTimeMs); } else { @@ -5179,81 +5645,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace WiredFaultChangeType -} // namespace Structs - -namespace Commands {} // namespace Commands +} // namespace TimeSnapshotResponse. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::Status::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, status); - case Attributes::Order::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, order); - case Attributes::Description::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, description); - case Attributes::WiredAssessedInputVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredAssessedInputVoltage); - case Attributes::WiredAssessedInputFrequency::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredAssessedInputFrequency); - case Attributes::WiredCurrentType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredCurrentType); - case Attributes::WiredAssessedCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredAssessedCurrent); - case Attributes::WiredNominalVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredNominalVoltage); - case Attributes::WiredMaximumCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredMaximumCurrent); - case Attributes::WiredPresent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiredPresent); - case Attributes::ActiveWiredFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeWiredFaults); - case Attributes::BatVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batVoltage); - case Attributes::BatPercentRemaining::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batPercentRemaining); - case Attributes::BatTimeRemaining::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batTimeRemaining); - case Attributes::BatChargeLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batChargeLevel); - case Attributes::BatReplacementNeeded::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batReplacementNeeded); - case Attributes::BatReplaceability::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batReplaceability); - case Attributes::BatPresent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batPresent); - case Attributes::ActiveBatFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeBatFaults); - case Attributes::BatReplacementDescription::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batReplacementDescription); - case Attributes::BatCommonDesignation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batCommonDesignation); - case Attributes::BatANSIDesignation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batANSIDesignation); - case Attributes::BatIECDesignation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batIECDesignation); - case Attributes::BatApprovedChemistry::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batApprovedChemistry); - case Attributes::BatCapacity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batCapacity); - case Attributes::BatQuantity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batQuantity); - case Attributes::BatChargeState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batChargeState); - case Attributes::BatTimeToFullCharge::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batTimeToFullCharge); - case Attributes::BatFunctionalWhileCharging::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batFunctionalWhileCharging); - case Attributes::BatChargingCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batChargingCurrent); - case Attributes::ActiveBatChargeFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeBatChargeFaults); - case Attributes::EndpointList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, endpointList); + case Attributes::NetworkInterfaces::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, networkInterfaces); + case Attributes::RebootCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rebootCount); + case Attributes::UpTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, upTime); + case Attributes::TotalOperationalHours::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, totalOperationalHours); + case Attributes::BootReason::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, bootReason); + case Attributes::ActiveHardwareFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeHardwareFaults); + case Attributes::ActiveRadioFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeRadioFaults); + case Attributes::ActiveNetworkFaults::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeNetworkFaults); + case Attributes::TestEventTriggersEnabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, testEventTriggersEnabled); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -5273,7 +5690,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace WiredFaultChange { +namespace HardwareFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; @@ -5312,8 +5729,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace WiredFaultChange. -namespace BatFaultChange { +} // namespace HardwareFaultChange. +namespace RadioFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; @@ -5352,8 +5769,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace BatFaultChange. -namespace BatChargeFaultChange { +} // namespace RadioFaultChange. +namespace NetworkFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; @@ -5392,20 +5809,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace BatChargeFaultChange. -} // namespace Events - -} // namespace PowerSource -namespace GeneralCommissioning { -namespace Structs { - -namespace BasicCommissioningInfo { +} // namespace NetworkFaultChange. +namespace BootReason { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFailSafeExpiryLengthSeconds), failSafeExpiryLengthSeconds); - encoder.Encode(to_underlying(Fields::kMaxCumulativeFailsafeSeconds), maxCumulativeFailsafeSeconds); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBootReason), bootReason)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -5422,13 +5833,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFailSafeExpiryLengthSeconds)) - { - err = DataModel::Decode(reader, failSafeExpiryLengthSeconds); - } - else if (__context_tag == to_underlying(Fields::kMaxCumulativeFailsafeSeconds)) + if (__context_tag == to_underlying(Fields::kBootReason)) { - err = DataModel::Decode(reader, maxCumulativeFailsafeSeconds); + err = DataModel::Decode(reader, bootReason); } else { @@ -5437,17 +5844,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace BootReason. +} // namespace Events -} // namespace BasicCommissioningInfo -} // namespace Structs +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +namespace Structs { -namespace Commands { -namespace ArmFailSafe { +namespace ThreadMetricsStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kExpiryLengthSeconds), expiryLengthSeconds); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + encoder.Encode(to_underlying(Fields::kId), id); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kStackFreeCurrent), stackFreeCurrent); + encoder.Encode(to_underlying(Fields::kStackFreeMinimum), stackFreeMinimum); + encoder.Encode(to_underlying(Fields::kStackSize), stackSize); return encoder.Finalize(); } @@ -5465,52 +5877,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kExpiryLengthSeconds)) - { - err = DataModel::Decode(reader, expiryLengthSeconds); - } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + if (__context_tag == to_underlying(Fields::kId)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, id); } - else + else if (__context_tag == to_underlying(Fields::kName)) { + err = DataModel::Decode(reader, name); } - - ReturnErrorOnFailure(err); - } -} -} // namespace ArmFailSafe. -namespace ArmFailSafeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kStackFreeCurrent)) { - return std::get(__element); + err = DataModel::Decode(reader, stackFreeCurrent); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kErrorCode)) + else if (__context_tag == to_underlying(Fields::kStackFreeMinimum)) { - err = DataModel::Decode(reader, errorCode); + err = DataModel::Decode(reader, stackFreeMinimum); } - else if (__context_tag == to_underlying(Fields::kDebugText)) + else if (__context_tag == to_underlying(Fields::kStackSize)) { - err = DataModel::Decode(reader, debugText); + err = DataModel::Decode(reader, stackSize); } else { @@ -5519,14 +5904,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ArmFailSafeResponse. -namespace SetRegulatoryConfig { + +} // namespace ThreadMetricsStruct +} // namespace Structs + +namespace Commands { +namespace ResetWatermarks { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewRegulatoryConfig), newRegulatoryConfig); - encoder.Encode(to_underlying(Fields::kCountryCode), countryCode); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); return encoder.Finalize(); } @@ -5540,145 +5926,24 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNewRegulatoryConfig)) - { - err = DataModel::Decode(reader, newRegulatoryConfig); - } - else if (__context_tag == to_underlying(Fields::kCountryCode)) - { - err = DataModel::Decode(reader, countryCode); - } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) - { - err = DataModel::Decode(reader, breadcrumb); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace SetRegulatoryConfig. -namespace SetRegulatoryConfigResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kErrorCode)) - { - err = DataModel::Decode(reader, errorCode); - } - else if (__context_tag == to_underlying(Fields::kDebugText)) - { - err = DataModel::Decode(reader, debugText); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace SetRegulatoryConfigResponse. -namespace CommissioningComplete { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace CommissioningComplete. -namespace CommissioningCompleteResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kErrorCode), errorCode); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kErrorCode)) - { - err = DataModel::Decode(reader, errorCode); - } - else if (__context_tag == to_underlying(Fields::kDebugText)) - { - err = DataModel::Decode(reader, debugText); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace CommissioningCompleteResponse. -} // namespace Commands +} // namespace ResetWatermarks. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::Breadcrumb::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, breadcrumb); - case Attributes::BasicCommissioningInfo::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, basicCommissioningInfo); - case Attributes::RegulatoryConfig::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, regulatoryConfig); - case Attributes::LocationCapability::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, locationCapability); - case Attributes::SupportsConcurrentConnection::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportsConcurrentConnection); + case Attributes::ThreadMetrics::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, threadMetrics); + case Attributes::CurrentHeapFree::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentHeapFree); + case Attributes::CurrentHeapUsed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentHeapUsed); + case Attributes::CurrentHeapHighWatermark::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentHeapHighWatermark); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -5697,21 +5962,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace GeneralCommissioning -namespace NetworkCommissioning { -namespace Structs { - -namespace NetworkInfoStruct { +namespace Events { +namespace SoftwareFault { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkID), networkID); - encoder.Encode(to_underlying(Fields::kConnected), connected); - encoder.Encode(to_underlying(Fields::kNetworkIdentifier), networkIdentifier); - encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kId), id)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFaultRecording), faultRecording)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -5728,21 +5988,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNetworkID)) - { - err = DataModel::Decode(reader, networkID); - } - else if (__context_tag == to_underlying(Fields::kConnected)) + if (__context_tag == to_underlying(Fields::kId)) { - err = DataModel::Decode(reader, connected); + err = DataModel::Decode(reader, id); } - else if (__context_tag == to_underlying(Fields::kNetworkIdentifier)) + else if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, networkIdentifier); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + else if (__context_tag == to_underlying(Fields::kFaultRecording)) { - err = DataModel::Decode(reader, clientIdentifier); + err = DataModel::Decode(reader, faultRecording); } else { @@ -5751,21 +6007,31 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace SoftwareFault. +} // namespace Events -} // namespace NetworkInfoStruct +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +namespace Structs { -namespace ThreadInterfaceScanResultStruct { +namespace NeighborTableStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPanId), panId); - encoder.Encode(to_underlying(Fields::kExtendedPanId), extendedPanId); - encoder.Encode(to_underlying(Fields::kNetworkName), networkName); - encoder.Encode(to_underlying(Fields::kChannel), channel); - encoder.Encode(to_underlying(Fields::kVersion), version); - encoder.Encode(to_underlying(Fields::kExtendedAddress), extendedAddress); - encoder.Encode(to_underlying(Fields::kRssi), rssi); + encoder.Encode(to_underlying(Fields::kExtAddress), extAddress); + encoder.Encode(to_underlying(Fields::kAge), age); + encoder.Encode(to_underlying(Fields::kRloc16), rloc16); + encoder.Encode(to_underlying(Fields::kLinkFrameCounter), linkFrameCounter); + encoder.Encode(to_underlying(Fields::kMleFrameCounter), mleFrameCounter); encoder.Encode(to_underlying(Fields::kLqi), lqi); + encoder.Encode(to_underlying(Fields::kAverageRssi), averageRssi); + encoder.Encode(to_underlying(Fields::kLastRssi), lastRssi); + encoder.Encode(to_underlying(Fields::kFrameErrorRate), frameErrorRate); + encoder.Encode(to_underlying(Fields::kMessageErrorRate), messageErrorRate); + encoder.Encode(to_underlying(Fields::kRxOnWhenIdle), rxOnWhenIdle); + encoder.Encode(to_underlying(Fields::kFullThreadDevice), fullThreadDevice); + encoder.Encode(to_underlying(Fields::kFullNetworkData), fullNetworkData); + encoder.Encode(to_underlying(Fields::kIsChild), isChild); return encoder.Finalize(); } @@ -5783,37 +6049,61 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPanId)) + if (__context_tag == to_underlying(Fields::kExtAddress)) { - err = DataModel::Decode(reader, panId); + err = DataModel::Decode(reader, extAddress); } - else if (__context_tag == to_underlying(Fields::kExtendedPanId)) + else if (__context_tag == to_underlying(Fields::kAge)) { - err = DataModel::Decode(reader, extendedPanId); + err = DataModel::Decode(reader, age); } - else if (__context_tag == to_underlying(Fields::kNetworkName)) + else if (__context_tag == to_underlying(Fields::kRloc16)) { - err = DataModel::Decode(reader, networkName); + err = DataModel::Decode(reader, rloc16); } - else if (__context_tag == to_underlying(Fields::kChannel)) + else if (__context_tag == to_underlying(Fields::kLinkFrameCounter)) { - err = DataModel::Decode(reader, channel); + err = DataModel::Decode(reader, linkFrameCounter); } - else if (__context_tag == to_underlying(Fields::kVersion)) + else if (__context_tag == to_underlying(Fields::kMleFrameCounter)) { - err = DataModel::Decode(reader, version); + err = DataModel::Decode(reader, mleFrameCounter); } - else if (__context_tag == to_underlying(Fields::kExtendedAddress)) + else if (__context_tag == to_underlying(Fields::kLqi)) { - err = DataModel::Decode(reader, extendedAddress); + err = DataModel::Decode(reader, lqi); } - else if (__context_tag == to_underlying(Fields::kRssi)) + else if (__context_tag == to_underlying(Fields::kAverageRssi)) { - err = DataModel::Decode(reader, rssi); + err = DataModel::Decode(reader, averageRssi); } - else if (__context_tag == to_underlying(Fields::kLqi)) + else if (__context_tag == to_underlying(Fields::kLastRssi)) { - err = DataModel::Decode(reader, lqi); + err = DataModel::Decode(reader, lastRssi); + } + else if (__context_tag == to_underlying(Fields::kFrameErrorRate)) + { + err = DataModel::Decode(reader, frameErrorRate); + } + else if (__context_tag == to_underlying(Fields::kMessageErrorRate)) + { + err = DataModel::Decode(reader, messageErrorRate); + } + else if (__context_tag == to_underlying(Fields::kRxOnWhenIdle)) + { + err = DataModel::Decode(reader, rxOnWhenIdle); + } + else if (__context_tag == to_underlying(Fields::kFullThreadDevice)) + { + err = DataModel::Decode(reader, fullThreadDevice); + } + else if (__context_tag == to_underlying(Fields::kFullNetworkData)) + { + err = DataModel::Decode(reader, fullNetworkData); + } + else if (__context_tag == to_underlying(Fields::kIsChild)) + { + err = DataModel::Decode(reader, isChild); } else { @@ -5823,18 +6113,24 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ThreadInterfaceScanResultStruct +} // namespace NeighborTableStruct -namespace WiFiInterfaceScanResultStruct { +namespace OperationalDatasetComponents { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSecurity), security); - encoder.Encode(to_underlying(Fields::kSsid), ssid); - encoder.Encode(to_underlying(Fields::kBssid), bssid); - encoder.Encode(to_underlying(Fields::kChannel), channel); - encoder.Encode(to_underlying(Fields::kWiFiBand), wiFiBand); - encoder.Encode(to_underlying(Fields::kRssi), rssi); + encoder.Encode(to_underlying(Fields::kActiveTimestampPresent), activeTimestampPresent); + encoder.Encode(to_underlying(Fields::kPendingTimestampPresent), pendingTimestampPresent); + encoder.Encode(to_underlying(Fields::kMasterKeyPresent), masterKeyPresent); + encoder.Encode(to_underlying(Fields::kNetworkNamePresent), networkNamePresent); + encoder.Encode(to_underlying(Fields::kExtendedPanIdPresent), extendedPanIdPresent); + encoder.Encode(to_underlying(Fields::kMeshLocalPrefixPresent), meshLocalPrefixPresent); + encoder.Encode(to_underlying(Fields::kDelayPresent), delayPresent); + encoder.Encode(to_underlying(Fields::kPanIdPresent), panIdPresent); + encoder.Encode(to_underlying(Fields::kChannelPresent), channelPresent); + encoder.Encode(to_underlying(Fields::kPskcPresent), pskcPresent); + encoder.Encode(to_underlying(Fields::kSecurityPolicyPresent), securityPolicyPresent); + encoder.Encode(to_underlying(Fields::kChannelMaskPresent), channelMaskPresent); return encoder.Finalize(); } @@ -5852,121 +6148,53 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSecurity)) + if (__context_tag == to_underlying(Fields::kActiveTimestampPresent)) { - err = DataModel::Decode(reader, security); + err = DataModel::Decode(reader, activeTimestampPresent); } - else if (__context_tag == to_underlying(Fields::kSsid)) + else if (__context_tag == to_underlying(Fields::kPendingTimestampPresent)) { - err = DataModel::Decode(reader, ssid); - } - else if (__context_tag == to_underlying(Fields::kBssid)) - { - err = DataModel::Decode(reader, bssid); - } - else if (__context_tag == to_underlying(Fields::kChannel)) - { - err = DataModel::Decode(reader, channel); - } - else if (__context_tag == to_underlying(Fields::kWiFiBand)) - { - err = DataModel::Decode(reader, wiFiBand); - } - else if (__context_tag == to_underlying(Fields::kRssi)) - { - err = DataModel::Decode(reader, rssi); + err = DataModel::Decode(reader, pendingTimestampPresent); } - else + else if (__context_tag == to_underlying(Fields::kMasterKeyPresent)) { + err = DataModel::Decode(reader, masterKeyPresent); } - - ReturnErrorOnFailure(err); - } -} - -} // namespace WiFiInterfaceScanResultStruct -} // namespace Structs - -namespace Commands { -namespace ScanNetworks { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSsid), ssid); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kNetworkNamePresent)) { - return std::get(__element); + err = DataModel::Decode(reader, networkNamePresent); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kSsid)) + else if (__context_tag == to_underlying(Fields::kExtendedPanIdPresent)) { - err = DataModel::Decode(reader, ssid); + err = DataModel::Decode(reader, extendedPanIdPresent); } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + else if (__context_tag == to_underlying(Fields::kMeshLocalPrefixPresent)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, meshLocalPrefixPresent); } - else + else if (__context_tag == to_underlying(Fields::kDelayPresent)) { + err = DataModel::Decode(reader, delayPresent); } - - ReturnErrorOnFailure(err); - } -} -} // namespace ScanNetworks. -namespace ScanNetworksResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - encoder.Encode(to_underlying(Fields::kWiFiScanResults), wiFiScanResults); - encoder.Encode(to_underlying(Fields::kThreadScanResults), threadScanResults); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kPanIdPresent)) { - return std::get(__element); + err = DataModel::Decode(reader, panIdPresent); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNetworkingStatus)) + else if (__context_tag == to_underlying(Fields::kChannelPresent)) { - err = DataModel::Decode(reader, networkingStatus); + err = DataModel::Decode(reader, channelPresent); } - else if (__context_tag == to_underlying(Fields::kDebugText)) + else if (__context_tag == to_underlying(Fields::kPskcPresent)) { - err = DataModel::Decode(reader, debugText); + err = DataModel::Decode(reader, pskcPresent); } - else if (__context_tag == to_underlying(Fields::kWiFiScanResults)) + else if (__context_tag == to_underlying(Fields::kSecurityPolicyPresent)) { - err = DataModel::Decode(reader, wiFiScanResults); + err = DataModel::Decode(reader, securityPolicyPresent); } - else if (__context_tag == to_underlying(Fields::kThreadScanResults)) + else if (__context_tag == to_underlying(Fields::kChannelMaskPresent)) { - err = DataModel::Decode(reader, threadScanResults); + err = DataModel::Decode(reader, channelMaskPresent); } else { @@ -5975,17 +6203,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ScanNetworksResponse. -namespace AddOrUpdateWiFiNetwork { + +} // namespace OperationalDatasetComponents + +namespace RouteTableStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSsid), ssid); - encoder.Encode(to_underlying(Fields::kCredentials), credentials); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); - encoder.Encode(to_underlying(Fields::kNetworkIdentity), networkIdentity); - encoder.Encode(to_underlying(Fields::kClientIdentifier), clientIdentifier); - encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); + encoder.Encode(to_underlying(Fields::kExtAddress), extAddress); + encoder.Encode(to_underlying(Fields::kRloc16), rloc16); + encoder.Encode(to_underlying(Fields::kRouterId), routerId); + encoder.Encode(to_underlying(Fields::kNextHop), nextHop); + encoder.Encode(to_underlying(Fields::kPathCost), pathCost); + encoder.Encode(to_underlying(Fields::kLQIIn), LQIIn); + encoder.Encode(to_underlying(Fields::kLQIOut), LQIOut); + encoder.Encode(to_underlying(Fields::kAge), age); + encoder.Encode(to_underlying(Fields::kAllocated), allocated); + encoder.Encode(to_underlying(Fields::kLinkEstablished), linkEstablished); return encoder.Finalize(); } @@ -6003,68 +6237,45 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSsid)) + if (__context_tag == to_underlying(Fields::kExtAddress)) { - err = DataModel::Decode(reader, ssid); + err = DataModel::Decode(reader, extAddress); } - else if (__context_tag == to_underlying(Fields::kCredentials)) + else if (__context_tag == to_underlying(Fields::kRloc16)) { - err = DataModel::Decode(reader, credentials); + err = DataModel::Decode(reader, rloc16); } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + else if (__context_tag == to_underlying(Fields::kRouterId)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, routerId); } - else if (__context_tag == to_underlying(Fields::kNetworkIdentity)) + else if (__context_tag == to_underlying(Fields::kNextHop)) { - err = DataModel::Decode(reader, networkIdentity); + err = DataModel::Decode(reader, nextHop); } - else if (__context_tag == to_underlying(Fields::kClientIdentifier)) + else if (__context_tag == to_underlying(Fields::kPathCost)) { - err = DataModel::Decode(reader, clientIdentifier); + err = DataModel::Decode(reader, pathCost); } - else if (__context_tag == to_underlying(Fields::kPossessionNonce)) + else if (__context_tag == to_underlying(Fields::kLQIIn)) { - err = DataModel::Decode(reader, possessionNonce); + err = DataModel::Decode(reader, LQIIn); } - else + else if (__context_tag == to_underlying(Fields::kLQIOut)) { + err = DataModel::Decode(reader, LQIOut); } - - ReturnErrorOnFailure(err); - } -} -} // namespace AddOrUpdateWiFiNetwork. -namespace AddOrUpdateThreadNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOperationalDataset), operationalDataset); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kAge)) { - return std::get(__element); + err = DataModel::Decode(reader, age); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kOperationalDataset)) + else if (__context_tag == to_underlying(Fields::kAllocated)) { - err = DataModel::Decode(reader, operationalDataset); + err = DataModel::Decode(reader, allocated); } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + else if (__context_tag == to_underlying(Fields::kLinkEstablished)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, linkEstablished); } else { @@ -6073,13 +6284,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddOrUpdateThreadNetwork. -namespace RemoveNetwork { + +} // namespace RouteTableStruct + +namespace SecurityPolicy { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkID), networkID); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); + encoder.Encode(to_underlying(Fields::kRotationTime), rotationTime); + encoder.Encode(to_underlying(Fields::kFlags), flags); return encoder.Finalize(); } @@ -6097,13 +6310,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNetworkID)) + if (__context_tag == to_underlying(Fields::kRotationTime)) { - err = DataModel::Decode(reader, networkID); + err = DataModel::Decode(reader, rotationTime); } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + else if (__context_tag == to_underlying(Fields::kFlags)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, flags); } else { @@ -6112,16 +6325,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RemoveNetwork. -namespace NetworkConfigResponse { + +} // namespace SecurityPolicy +} // namespace Structs + +namespace Commands { +namespace ResetCounts { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - encoder.Encode(to_underlying(Fields::kNetworkIndex), networkIndex); - encoder.Encode(to_underlying(Fields::kClientIdentity), clientIdentity); - encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); return encoder.Finalize(); } @@ -6135,85 +6347,168 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNetworkingStatus)) - { - err = DataModel::Decode(reader, networkingStatus); - } - else if (__context_tag == to_underlying(Fields::kDebugText)) - { - err = DataModel::Decode(reader, debugText); - } - else if (__context_tag == to_underlying(Fields::kNetworkIndex)) - { - err = DataModel::Decode(reader, networkIndex); - } - else if (__context_tag == to_underlying(Fields::kClientIdentity)) - { - err = DataModel::Decode(reader, clientIdentity); - } - else if (__context_tag == to_underlying(Fields::kPossessionSignature)) - { - err = DataModel::Decode(reader, possessionSignature); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace NetworkConfigResponse. -namespace ConnectNetwork { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkID), networkID); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); - return encoder.Finalize(); -} +} // namespace ResetCounts. +} // namespace Commands -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNetworkID)) - { - err = DataModel::Decode(reader, networkID); - } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) - { - err = DataModel::Decode(reader, breadcrumb); - } - else - { - } - - ReturnErrorOnFailure(err); + case Attributes::Channel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, channel); + case Attributes::RoutingRole::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, routingRole); + case Attributes::NetworkName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, networkName); + case Attributes::PanId::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, panId); + case Attributes::ExtendedPanId::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, extendedPanId); + case Attributes::MeshLocalPrefix::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, meshLocalPrefix); + case Attributes::OverrunCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, overrunCount); + case Attributes::NeighborTable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, neighborTable); + case Attributes::RouteTable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, routeTable); + case Attributes::PartitionId::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, partitionId); + case Attributes::Weighting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, weighting); + case Attributes::DataVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, dataVersion); + case Attributes::StableDataVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, stableDataVersion); + case Attributes::LeaderRouterId::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, leaderRouterId); + case Attributes::DetachedRoleCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, detachedRoleCount); + case Attributes::ChildRoleCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, childRoleCount); + case Attributes::RouterRoleCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, routerRoleCount); + case Attributes::LeaderRoleCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, leaderRoleCount); + case Attributes::AttachAttemptCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attachAttemptCount); + case Attributes::PartitionIdChangeCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, partitionIdChangeCount); + case Attributes::BetterPartitionAttachAttemptCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, betterPartitionAttachAttemptCount); + case Attributes::ParentChangeCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, parentChangeCount); + case Attributes::TxTotalCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txTotalCount); + case Attributes::TxUnicastCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txUnicastCount); + case Attributes::TxBroadcastCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txBroadcastCount); + case Attributes::TxAckRequestedCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txAckRequestedCount); + case Attributes::TxAckedCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txAckedCount); + case Attributes::TxNoAckRequestedCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txNoAckRequestedCount); + case Attributes::TxDataCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txDataCount); + case Attributes::TxDataPollCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txDataPollCount); + case Attributes::TxBeaconCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txBeaconCount); + case Attributes::TxBeaconRequestCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txBeaconRequestCount); + case Attributes::TxOtherCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txOtherCount); + case Attributes::TxRetryCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txRetryCount); + case Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txDirectMaxRetryExpiryCount); + case Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txIndirectMaxRetryExpiryCount); + case Attributes::TxErrCcaCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txErrCcaCount); + case Attributes::TxErrAbortCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txErrAbortCount); + case Attributes::TxErrBusyChannelCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txErrBusyChannelCount); + case Attributes::RxTotalCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxTotalCount); + case Attributes::RxUnicastCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxUnicastCount); + case Attributes::RxBroadcastCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxBroadcastCount); + case Attributes::RxDataCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxDataCount); + case Attributes::RxDataPollCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxDataPollCount); + case Attributes::RxBeaconCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxBeaconCount); + case Attributes::RxBeaconRequestCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxBeaconRequestCount); + case Attributes::RxOtherCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxOtherCount); + case Attributes::RxAddressFilteredCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxAddressFilteredCount); + case Attributes::RxDestAddrFilteredCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxDestAddrFilteredCount); + case Attributes::RxDuplicatedCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxDuplicatedCount); + case Attributes::RxErrNoFrameCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrNoFrameCount); + case Attributes::RxErrUnknownNeighborCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrUnknownNeighborCount); + case Attributes::RxErrInvalidSrcAddrCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrInvalidSrcAddrCount); + case Attributes::RxErrSecCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrSecCount); + case Attributes::RxErrFcsCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrFcsCount); + case Attributes::RxErrOtherCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rxErrOtherCount); + case Attributes::ActiveTimestamp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeTimestamp); + case Attributes::PendingTimestamp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, pendingTimestamp); + case Attributes::Delay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, delay); + case Attributes::SecurityPolicy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, securityPolicy); + case Attributes::ChannelPage0Mask::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, channelPage0Mask); + case Attributes::OperationalDatasetComponents::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalDatasetComponents); + case Attributes::ActiveNetworkFaultsList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeNetworkFaultsList); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace ConnectNetwork. -namespace ConnectNetworkResponse { +} // namespace Attributes + +namespace Events { +namespace ConnectionStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkingStatus), networkingStatus); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); - encoder.Encode(to_underlying(Fields::kErrorValue), errorValue); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6230,17 +6525,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNetworkingStatus)) - { - err = DataModel::Decode(reader, networkingStatus); - } - else if (__context_tag == to_underlying(Fields::kDebugText)) - { - err = DataModel::Decode(reader, debugText); - } - else if (__context_tag == to_underlying(Fields::kErrorValue)) + if (__context_tag == to_underlying(Fields::kConnectionStatus)) { - err = DataModel::Decode(reader, errorValue); + err = DataModel::Decode(reader, connectionStatus); } else { @@ -6249,15 +6536,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ConnectNetworkResponse. -namespace ReorderNetwork { +} // namespace ConnectionStatus. +namespace NetworkFaultChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNetworkID), networkID); - encoder.Encode(to_underlying(Fields::kNetworkIndex), networkIndex); - encoder.Encode(to_underlying(Fields::kBreadcrumb), breadcrumb); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6274,17 +6561,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNetworkID)) - { - err = DataModel::Decode(reader, networkID); - } - else if (__context_tag == to_underlying(Fields::kNetworkIndex)) + if (__context_tag == to_underlying(Fields::kCurrent)) { - err = DataModel::Decode(reader, networkIndex); + err = DataModel::Decode(reader, current); } - else if (__context_tag == to_underlying(Fields::kBreadcrumb)) + else if (__context_tag == to_underlying(Fields::kPrevious)) { - err = DataModel::Decode(reader, breadcrumb); + err = DataModel::Decode(reader, previous); } else { @@ -6293,13 +6576,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ReorderNetwork. -namespace QueryIdentity { +} // namespace NetworkFaultChange. +} // namespace Events + +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { + +namespace Commands { +namespace ResetCounts { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kKeyIdentifier), keyIdentifier); - encoder.Encode(to_underlying(Fields::kPossessionNonce), possessionNonce); return encoder.Finalize(); } @@ -6313,33 +6600,68 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace ResetCounts. +} // namespace Commands - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kKeyIdentifier)) - { - err = DataModel::Decode(reader, keyIdentifier); - } - else if (__context_tag == to_underlying(Fields::kPossessionNonce)) - { - err = DataModel::Decode(reader, possessionNonce); - } - else - { - } - - ReturnErrorOnFailure(err); +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Bssid::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, bssid); + case Attributes::SecurityType::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, securityType); + case Attributes::WiFiVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wiFiVersion); + case Attributes::ChannelNumber::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, channelNumber); + case Attributes::Rssi::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, rssi); + case Attributes::BeaconLostCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, beaconLostCount); + case Attributes::BeaconRxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, beaconRxCount); + case Attributes::PacketMulticastRxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetMulticastRxCount); + case Attributes::PacketMulticastTxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetMulticastTxCount); + case Attributes::PacketUnicastRxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetUnicastRxCount); + case Attributes::PacketUnicastTxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetUnicastTxCount); + case Attributes::CurrentMaxRate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMaxRate); + case Attributes::OverrunCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, overrunCount); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace QueryIdentity. -namespace QueryIdentityResponse { +} // namespace Attributes + +namespace Events { +namespace Disconnection { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIdentity), identity); - encoder.Encode(to_underlying(Fields::kPossessionSignature), possessionSignature); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReasonCode), reasonCode)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6356,13 +6678,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kIdentity)) - { - err = DataModel::Decode(reader, identity); - } - else if (__context_tag == to_underlying(Fields::kPossessionSignature)) + if (__context_tag == to_underlying(Fields::kReasonCode)) { - err = DataModel::Decode(reader, possessionSignature); + err = DataModel::Decode(reader, reasonCode); } else { @@ -6371,68 +6689,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace QueryIdentityResponse. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MaxNetworks::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxNetworks); - case Attributes::Networks::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, networks); - case Attributes::ScanMaxTimeSeconds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, scanMaxTimeSeconds); - case Attributes::ConnectMaxTimeSeconds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, connectMaxTimeSeconds); - case Attributes::InterfaceEnabled::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, interfaceEnabled); - case Attributes::LastNetworkingStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lastNetworkingStatus); - case Attributes::LastNetworkID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lastNetworkID); - case Attributes::LastConnectErrorValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lastConnectErrorValue); - case Attributes::SupportedWiFiBands::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedWiFiBands); - case Attributes::SupportedThreadFeatures::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedThreadFeatures); - case Attributes::ThreadVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, threadVersion); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace NetworkCommissioning -namespace DiagnosticLogs { - -namespace Commands { -namespace RetrieveLogsRequest { +} // namespace Disconnection. +namespace AssociationFailure { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kIntent), intent); - encoder.Encode(to_underlying(Fields::kRequestedProtocol), requestedProtocol); - encoder.Encode(to_underlying(Fields::kTransferFileDesignator), transferFileDesignator); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAssociationFailureCause), associationFailureCause)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6449,17 +6714,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kIntent)) - { - err = DataModel::Decode(reader, intent); - } - else if (__context_tag == to_underlying(Fields::kRequestedProtocol)) + if (__context_tag == to_underlying(Fields::kAssociationFailureCause)) { - err = DataModel::Decode(reader, requestedProtocol); + err = DataModel::Decode(reader, associationFailureCause); } - else if (__context_tag == to_underlying(Fields::kTransferFileDesignator)) + else if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, transferFileDesignator); + err = DataModel::Decode(reader, status); } else { @@ -6468,16 +6729,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RetrieveLogsRequest. -namespace RetrieveLogsResponse { +} // namespace AssociationFailure. +namespace ConnectionStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kLogContent), logContent); - encoder.Encode(to_underlying(Fields::kUTCTimeStamp), UTCTimeStamp); - encoder.Encode(to_underlying(Fields::kTimeSinceBoot), timeSinceBoot); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6494,21 +6753,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kLogContent)) - { - err = DataModel::Decode(reader, logContent); - } - else if (__context_tag == to_underlying(Fields::kUTCTimeStamp)) - { - err = DataModel::Decode(reader, UTCTimeStamp); - } - else if (__context_tag == to_underlying(Fields::kTimeSinceBoot)) + if (__context_tag == to_underlying(Fields::kConnectionStatus)) { - err = DataModel::Decode(reader, timeSinceBoot); + err = DataModel::Decode(reader, connectionStatus); } else { @@ -6517,7 +6764,33 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RetrieveLogsResponse. +} // namespace ConnectionStatus. +} // namespace Events + +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { + +namespace Commands { +namespace ResetCounts { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace ResetCounts. } // namespace Commands namespace Attributes { @@ -6525,6 +6798,24 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { + case Attributes::PHYRate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, PHYRate); + case Attributes::FullDuplex::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fullDuplex); + case Attributes::PacketRxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetRxCount); + case Attributes::PacketTxCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, packetTxCount); + case Attributes::TxErrCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, txErrCount); + case Attributes::CollisionCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, collisionCount); + case Attributes::OverrunCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, overrunCount); + case Attributes::CarrierDetect::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, carrierDetect); + case Attributes::TimeSinceReset::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeSinceReset); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -6545,22 +6836,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace DiagnosticLogs -namespace GeneralDiagnostics { +} // namespace EthernetNetworkDiagnostics +namespace TimeSynchronization { namespace Structs { -namespace NetworkInterface { +namespace DSTOffsetStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kIsOperational), isOperational); - encoder.Encode(to_underlying(Fields::kOffPremiseServicesReachableIPv4), offPremiseServicesReachableIPv4); - encoder.Encode(to_underlying(Fields::kOffPremiseServicesReachableIPv6), offPremiseServicesReachableIPv6); - encoder.Encode(to_underlying(Fields::kHardwareAddress), hardwareAddress); - encoder.Encode(to_underlying(Fields::kIPv4Addresses), IPv4Addresses); - encoder.Encode(to_underlying(Fields::kIPv6Addresses), IPv6Addresses); - encoder.Encode(to_underlying(Fields::kType), type); + encoder.Encode(to_underlying(Fields::kOffset), offset); + encoder.Encode(to_underlying(Fields::kValidStarting), validStarting); + encoder.Encode(to_underlying(Fields::kValidUntil), validUntil); return encoder.Finalize(); } @@ -6578,37 +6864,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kName)) + if (__context_tag == to_underlying(Fields::kOffset)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, offset); } - else if (__context_tag == to_underlying(Fields::kIsOperational)) + else if (__context_tag == to_underlying(Fields::kValidStarting)) { - err = DataModel::Decode(reader, isOperational); + err = DataModel::Decode(reader, validStarting); } - else if (__context_tag == to_underlying(Fields::kOffPremiseServicesReachableIPv4)) + else if (__context_tag == to_underlying(Fields::kValidUntil)) { - err = DataModel::Decode(reader, offPremiseServicesReachableIPv4); - } - else if (__context_tag == to_underlying(Fields::kOffPremiseServicesReachableIPv6)) - { - err = DataModel::Decode(reader, offPremiseServicesReachableIPv6); - } - else if (__context_tag == to_underlying(Fields::kHardwareAddress)) - { - err = DataModel::Decode(reader, hardwareAddress); - } - else if (__context_tag == to_underlying(Fields::kIPv4Addresses)) - { - err = DataModel::Decode(reader, IPv4Addresses); - } - else if (__context_tag == to_underlying(Fields::kIPv6Addresses)) - { - err = DataModel::Decode(reader, IPv6Addresses); - } - else if (__context_tag == to_underlying(Fields::kType)) - { - err = DataModel::Decode(reader, type); + err = DataModel::Decode(reader, validUntil); } else { @@ -6618,16 +6884,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace NetworkInterface -} // namespace Structs +} // namespace DSTOffsetStruct -namespace Commands { -namespace TestEventTrigger { +namespace FabricScopedTrustedTimeSourceStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kEnableKey), enableKey); - encoder.Encode(to_underlying(Fields::kEventTrigger), eventTrigger); + encoder.Encode(to_underlying(Fields::kNodeID), nodeID); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); return encoder.Finalize(); } @@ -6645,13 +6909,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kEnableKey)) + if (__context_tag == to_underlying(Fields::kNodeID)) { - err = DataModel::Decode(reader, enableKey); + err = DataModel::Decode(reader, nodeID); } - else if (__context_tag == to_underlying(Fields::kEventTrigger)) + else if (__context_tag == to_underlying(Fields::kEndpoint)) { - err = DataModel::Decode(reader, eventTrigger); + err = DataModel::Decode(reader, endpoint); } else { @@ -6660,11 +6924,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace TestEventTrigger. -namespace TimeSnapshot { + +} // namespace FabricScopedTrustedTimeSourceStruct + +namespace TimeZoneStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kOffset), offset); + encoder.Encode(to_underlying(Fields::kValidAt), validAt); + encoder.Encode(to_underlying(Fields::kName), name); return encoder.Finalize(); } @@ -6678,15 +6947,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kOffset)) + { + err = DataModel::Decode(reader, offset); + } + else if (__context_tag == to_underlying(Fields::kValidAt)) + { + err = DataModel::Decode(reader, validAt); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace TimeSnapshot. -namespace TimeSnapshotResponse { + +} // namespace TimeZoneStruct + +namespace TrustedTimeSourceStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kSystemTimeMs), systemTimeMs); - encoder.Encode(to_underlying(Fields::kPosixTimeMs), posixTimeMs); + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + encoder.Encode(to_underlying(Fields::kNodeID), nodeID); + encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); return encoder.Finalize(); } @@ -6704,13 +6997,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSystemTimeMs)) + if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, systemTimeMs); + err = DataModel::Decode(reader, fabricIndex); } - else if (__context_tag == to_underlying(Fields::kPosixTimeMs)) + else if (__context_tag == to_underlying(Fields::kNodeID)) { - err = DataModel::Decode(reader, posixTimeMs); + err = DataModel::Decode(reader, nodeID); + } + else if (__context_tag == to_underlying(Fields::kEndpoint)) + { + err = DataModel::Decode(reader, endpoint); } else { @@ -6719,59 +7016,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace TimeSnapshotResponse. -} // namespace Commands -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::NetworkInterfaces::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, networkInterfaces); - case Attributes::RebootCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rebootCount); - case Attributes::UpTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, upTime); - case Attributes::TotalOperationalHours::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, totalOperationalHours); - case Attributes::BootReason::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, bootReason); - case Attributes::ActiveHardwareFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeHardwareFaults); - case Attributes::ActiveRadioFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeRadioFaults); - case Attributes::ActiveNetworkFaults::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeNetworkFaults); - case Attributes::TestEventTriggersEnabled::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, testEventTriggersEnabled); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes +} // namespace TrustedTimeSourceStruct +} // namespace Structs -namespace Events { -namespace HardwareFaultChange { +namespace Commands { +namespace SetUTCTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kUTCTime), UTCTime); + encoder.Encode(to_underlying(Fields::kGranularity), granularity); + encoder.Encode(to_underlying(Fields::kTimeSource), timeSource); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6788,13 +7045,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCurrent)) + if (__context_tag == to_underlying(Fields::kUTCTime)) { - err = DataModel::Decode(reader, current); + err = DataModel::Decode(reader, UTCTime); } - else if (__context_tag == to_underlying(Fields::kPrevious)) + else if (__context_tag == to_underlying(Fields::kGranularity)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, granularity); + } + else if (__context_tag == to_underlying(Fields::kTimeSource)) + { + err = DataModel::Decode(reader, timeSource); } else { @@ -6803,15 +7064,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace HardwareFaultChange. -namespace RadioFaultChange { +} // namespace SetUTCTime. +namespace SetTrustedTimeSource { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTrustedTimeSource), trustedTimeSource); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6828,13 +7087,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCurrent)) - { - err = DataModel::Decode(reader, current); - } - else if (__context_tag == to_underlying(Fields::kPrevious)) + if (__context_tag == to_underlying(Fields::kTrustedTimeSource)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, trustedTimeSource); } else { @@ -6843,15 +7098,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RadioFaultChange. -namespace NetworkFaultChange { +} // namespace SetTrustedTimeSource. +namespace SetTimeZone { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeZone), timeZone); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6868,13 +7121,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCurrent)) - { - err = DataModel::Decode(reader, current); - } - else if (__context_tag == to_underlying(Fields::kPrevious)) + if (__context_tag == to_underlying(Fields::kTimeZone)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, timeZone); } else { @@ -6883,14 +7132,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace NetworkFaultChange. -namespace BootReason { +} // namespace SetTimeZone. +namespace SetTimeZoneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kBootReason), bootReason)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDSTOffsetRequired), DSTOffsetRequired); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -6907,9 +7155,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kBootReason)) + if (__context_tag == to_underlying(Fields::kDSTOffsetRequired)) { - err = DataModel::Decode(reader, bootReason); + err = DataModel::Decode(reader, DSTOffsetRequired); } else { @@ -6918,22 +7166,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace BootReason. -} // namespace Events - -} // namespace GeneralDiagnostics -namespace SoftwareDiagnostics { -namespace Structs { - -namespace ThreadMetricsStruct { +} // namespace SetTimeZoneResponse. +namespace SetDSTOffset { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kId), id); - encoder.Encode(to_underlying(Fields::kName), name); - encoder.Encode(to_underlying(Fields::kStackFreeCurrent), stackFreeCurrent); - encoder.Encode(to_underlying(Fields::kStackFreeMinimum), stackFreeMinimum); - encoder.Encode(to_underlying(Fields::kStackSize), stackSize); + encoder.Encode(to_underlying(Fields::kDSTOffset), DSTOffset); return encoder.Finalize(); } @@ -6951,25 +7189,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kId)) - { - err = DataModel::Decode(reader, id); - } - else if (__context_tag == to_underlying(Fields::kName)) - { - err = DataModel::Decode(reader, name); - } - else if (__context_tag == to_underlying(Fields::kStackFreeCurrent)) - { - err = DataModel::Decode(reader, stackFreeCurrent); - } - else if (__context_tag == to_underlying(Fields::kStackFreeMinimum)) - { - err = DataModel::Decode(reader, stackFreeMinimum); - } - else if (__context_tag == to_underlying(Fields::kStackSize)) + if (__context_tag == to_underlying(Fields::kDSTOffset)) { - err = DataModel::Decode(reader, stackSize); + err = DataModel::Decode(reader, DSTOffset); } else { @@ -6978,15 +7200,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ThreadMetricsStruct -} // namespace Structs - -namespace Commands { -namespace ResetWatermarks { +} // namespace SetDSTOffset. +namespace SetDefaultNTP { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDefaultNTP), defaultNTP); return encoder.Finalize(); } @@ -7000,9 +7219,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kDefaultNTP)) + { + err = DataModel::Decode(reader, defaultNTP); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace ResetWatermarks. +} // namespace SetDefaultNTP. } // namespace Commands namespace Attributes { @@ -7010,14 +7242,32 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::ThreadMetrics::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, threadMetrics); - case Attributes::CurrentHeapFree::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentHeapFree); - case Attributes::CurrentHeapUsed::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentHeapUsed); - case Attributes::CurrentHeapHighWatermark::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentHeapHighWatermark); + case Attributes::UTCTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, UTCTime); + case Attributes::Granularity::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, granularity); + case Attributes::TimeSource::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeSource); + case Attributes::TrustedTimeSource::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, trustedTimeSource); + case Attributes::DefaultNTP::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, defaultNTP); + case Attributes::TimeZone::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeZone); + case Attributes::DSTOffset::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, DSTOffset); + case Attributes::LocalTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, localTime); + case Attributes::TimeZoneDatabase::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeZoneDatabase); + case Attributes::NTPServerAvailable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, NTPServerAvailable); + case Attributes::TimeZoneListMaxSize::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeZoneListMaxSize); + case Attributes::DSTOffsetListMaxSize::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, DSTOffsetListMaxSize); + case Attributes::SupportsDNSResolve::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportsDNSResolve); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -7037,14 +7287,33 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace SoftwareFault { +namespace DSTTableEmpty { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kId), id)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFaultRecording), faultRecording)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace DSTTableEmpty. +namespace DSTStatus { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffsetActive), DSTOffsetActive)); return aWriter.EndContainer(outer); } @@ -7062,17 +7331,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kId)) - { - err = DataModel::Decode(reader, id); - } - else if (__context_tag == to_underlying(Fields::kName)) - { - err = DataModel::Decode(reader, name); - } - else if (__context_tag == to_underlying(Fields::kFaultRecording)) + if (__context_tag == to_underlying(Fields::kDSTOffsetActive)) { - err = DataModel::Decode(reader, faultRecording); + err = DataModel::Decode(reader, DSTOffsetActive); } else { @@ -7081,32 +7342,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SoftwareFault. -} // namespace Events - -} // namespace SoftwareDiagnostics -namespace ThreadNetworkDiagnostics { -namespace Structs { - -namespace NeighborTableStruct { +} // namespace DSTStatus. +namespace TimeZoneStatus { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kExtAddress), extAddress); - encoder.Encode(to_underlying(Fields::kAge), age); - encoder.Encode(to_underlying(Fields::kRloc16), rloc16); - encoder.Encode(to_underlying(Fields::kLinkFrameCounter), linkFrameCounter); - encoder.Encode(to_underlying(Fields::kMleFrameCounter), mleFrameCounter); - encoder.Encode(to_underlying(Fields::kLqi), lqi); - encoder.Encode(to_underlying(Fields::kAverageRssi), averageRssi); - encoder.Encode(to_underlying(Fields::kLastRssi), lastRssi); - encoder.Encode(to_underlying(Fields::kFrameErrorRate), frameErrorRate); - encoder.Encode(to_underlying(Fields::kMessageErrorRate), messageErrorRate); - encoder.Encode(to_underlying(Fields::kRxOnWhenIdle), rxOnWhenIdle); - encoder.Encode(to_underlying(Fields::kFullThreadDevice), fullThreadDevice); - encoder.Encode(to_underlying(Fields::kFullNetworkData), fullNetworkData); - encoder.Encode(to_underlying(Fields::kIsChild), isChild); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOffset), offset)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -7123,88 +7367,76 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kExtAddress)) - { - err = DataModel::Decode(reader, extAddress); - } - else if (__context_tag == to_underlying(Fields::kAge)) - { - err = DataModel::Decode(reader, age); - } - else if (__context_tag == to_underlying(Fields::kRloc16)) - { - err = DataModel::Decode(reader, rloc16); - } - else if (__context_tag == to_underlying(Fields::kLinkFrameCounter)) - { - err = DataModel::Decode(reader, linkFrameCounter); - } - else if (__context_tag == to_underlying(Fields::kMleFrameCounter)) - { - err = DataModel::Decode(reader, mleFrameCounter); - } - else if (__context_tag == to_underlying(Fields::kLqi)) - { - err = DataModel::Decode(reader, lqi); - } - else if (__context_tag == to_underlying(Fields::kAverageRssi)) - { - err = DataModel::Decode(reader, averageRssi); - } - else if (__context_tag == to_underlying(Fields::kLastRssi)) - { - err = DataModel::Decode(reader, lastRssi); - } - else if (__context_tag == to_underlying(Fields::kFrameErrorRate)) - { - err = DataModel::Decode(reader, frameErrorRate); - } - else if (__context_tag == to_underlying(Fields::kMessageErrorRate)) - { - err = DataModel::Decode(reader, messageErrorRate); - } - else if (__context_tag == to_underlying(Fields::kRxOnWhenIdle)) + if (__context_tag == to_underlying(Fields::kOffset)) { - err = DataModel::Decode(reader, rxOnWhenIdle); + err = DataModel::Decode(reader, offset); } - else if (__context_tag == to_underlying(Fields::kFullThreadDevice)) + else if (__context_tag == to_underlying(Fields::kName)) { - err = DataModel::Decode(reader, fullThreadDevice); + err = DataModel::Decode(reader, name); } - else if (__context_tag == to_underlying(Fields::kFullNetworkData)) + else { - err = DataModel::Decode(reader, fullNetworkData); } - else if (__context_tag == to_underlying(Fields::kIsChild)) + + ReturnErrorOnFailure(err); + } +} +} // namespace TimeZoneStatus. +namespace TimeFailure { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, isChild); + return std::get(__element); } - else + } +} +} // namespace TimeFailure. +namespace MissingTrustedTimeSource { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { + return std::get(__element); } - - ReturnErrorOnFailure(err); } } +} // namespace MissingTrustedTimeSource. +} // namespace Events -} // namespace NeighborTableStruct +} // namespace TimeSynchronization +namespace BridgedDeviceBasicInformation { +namespace Structs { -namespace OperationalDatasetComponents { +namespace ProductAppearanceStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kActiveTimestampPresent), activeTimestampPresent); - encoder.Encode(to_underlying(Fields::kPendingTimestampPresent), pendingTimestampPresent); - encoder.Encode(to_underlying(Fields::kMasterKeyPresent), masterKeyPresent); - encoder.Encode(to_underlying(Fields::kNetworkNamePresent), networkNamePresent); - encoder.Encode(to_underlying(Fields::kExtendedPanIdPresent), extendedPanIdPresent); - encoder.Encode(to_underlying(Fields::kMeshLocalPrefixPresent), meshLocalPrefixPresent); - encoder.Encode(to_underlying(Fields::kDelayPresent), delayPresent); - encoder.Encode(to_underlying(Fields::kPanIdPresent), panIdPresent); - encoder.Encode(to_underlying(Fields::kChannelPresent), channelPresent); - encoder.Encode(to_underlying(Fields::kPskcPresent), pskcPresent); - encoder.Encode(to_underlying(Fields::kSecurityPolicyPresent), securityPolicyPresent); - encoder.Encode(to_underlying(Fields::kChannelMaskPresent), channelMaskPresent); + encoder.Encode(to_underlying(Fields::kFinish), finish); + encoder.Encode(to_underlying(Fields::kPrimaryColor), primaryColor); return encoder.Finalize(); } @@ -7222,55 +7454,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActiveTimestampPresent)) + if (__context_tag == to_underlying(Fields::kFinish)) { - err = DataModel::Decode(reader, activeTimestampPresent); + err = DataModel::Decode(reader, finish); } - else if (__context_tag == to_underlying(Fields::kPendingTimestampPresent)) + else if (__context_tag == to_underlying(Fields::kPrimaryColor)) { - err = DataModel::Decode(reader, pendingTimestampPresent); + err = DataModel::Decode(reader, primaryColor); } - else if (__context_tag == to_underlying(Fields::kMasterKeyPresent)) - { - err = DataModel::Decode(reader, masterKeyPresent); - } - else if (__context_tag == to_underlying(Fields::kNetworkNamePresent)) - { - err = DataModel::Decode(reader, networkNamePresent); - } - else if (__context_tag == to_underlying(Fields::kExtendedPanIdPresent)) - { - err = DataModel::Decode(reader, extendedPanIdPresent); - } - else if (__context_tag == to_underlying(Fields::kMeshLocalPrefixPresent)) - { - err = DataModel::Decode(reader, meshLocalPrefixPresent); - } - else if (__context_tag == to_underlying(Fields::kDelayPresent)) - { - err = DataModel::Decode(reader, delayPresent); - } - else if (__context_tag == to_underlying(Fields::kPanIdPresent)) - { - err = DataModel::Decode(reader, panIdPresent); - } - else if (__context_tag == to_underlying(Fields::kChannelPresent)) - { - err = DataModel::Decode(reader, channelPresent); - } - else if (__context_tag == to_underlying(Fields::kPskcPresent)) - { - err = DataModel::Decode(reader, pskcPresent); - } - else if (__context_tag == to_underlying(Fields::kSecurityPolicyPresent)) - { - err = DataModel::Decode(reader, securityPolicyPresent); - } - else if (__context_tag == to_underlying(Fields::kChannelMaskPresent)) - { - err = DataModel::Decode(reader, channelMaskPresent); - } - else + else { } @@ -7278,438 +7470,48 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace OperationalDatasetComponents - -namespace RouteTableStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kExtAddress), extAddress); - encoder.Encode(to_underlying(Fields::kRloc16), rloc16); - encoder.Encode(to_underlying(Fields::kRouterId), routerId); - encoder.Encode(to_underlying(Fields::kNextHop), nextHop); - encoder.Encode(to_underlying(Fields::kPathCost), pathCost); - encoder.Encode(to_underlying(Fields::kLQIIn), LQIIn); - encoder.Encode(to_underlying(Fields::kLQIOut), LQIOut); - encoder.Encode(to_underlying(Fields::kAge), age); - encoder.Encode(to_underlying(Fields::kAllocated), allocated); - encoder.Encode(to_underlying(Fields::kLinkEstablished), linkEstablished); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kExtAddress)) - { - err = DataModel::Decode(reader, extAddress); - } - else if (__context_tag == to_underlying(Fields::kRloc16)) - { - err = DataModel::Decode(reader, rloc16); - } - else if (__context_tag == to_underlying(Fields::kRouterId)) - { - err = DataModel::Decode(reader, routerId); - } - else if (__context_tag == to_underlying(Fields::kNextHop)) - { - err = DataModel::Decode(reader, nextHop); - } - else if (__context_tag == to_underlying(Fields::kPathCost)) - { - err = DataModel::Decode(reader, pathCost); - } - else if (__context_tag == to_underlying(Fields::kLQIIn)) - { - err = DataModel::Decode(reader, LQIIn); - } - else if (__context_tag == to_underlying(Fields::kLQIOut)) - { - err = DataModel::Decode(reader, LQIOut); - } - else if (__context_tag == to_underlying(Fields::kAge)) - { - err = DataModel::Decode(reader, age); - } - else if (__context_tag == to_underlying(Fields::kAllocated)) - { - err = DataModel::Decode(reader, allocated); - } - else if (__context_tag == to_underlying(Fields::kLinkEstablished)) - { - err = DataModel::Decode(reader, linkEstablished); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace RouteTableStruct - -namespace SecurityPolicy { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRotationTime), rotationTime); - encoder.Encode(to_underlying(Fields::kFlags), flags); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kRotationTime)) - { - err = DataModel::Decode(reader, rotationTime); - } - else if (__context_tag == to_underlying(Fields::kFlags)) - { - err = DataModel::Decode(reader, flags); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace SecurityPolicy +} // namespace ProductAppearanceStruct } // namespace Structs -namespace Commands { -namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace ResetCounts. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::Channel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, channel); - case Attributes::RoutingRole::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, routingRole); - case Attributes::NetworkName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, networkName); - case Attributes::PanId::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, panId); - case Attributes::ExtendedPanId::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, extendedPanId); - case Attributes::MeshLocalPrefix::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, meshLocalPrefix); - case Attributes::OverrunCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, overrunCount); - case Attributes::NeighborTable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, neighborTable); - case Attributes::RouteTable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, routeTable); - case Attributes::PartitionId::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, partitionId); - case Attributes::Weighting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, weighting); - case Attributes::DataVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dataVersion); - case Attributes::StableDataVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, stableDataVersion); - case Attributes::LeaderRouterId::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, leaderRouterId); - case Attributes::DetachedRoleCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, detachedRoleCount); - case Attributes::ChildRoleCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, childRoleCount); - case Attributes::RouterRoleCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, routerRoleCount); - case Attributes::LeaderRoleCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, leaderRoleCount); - case Attributes::AttachAttemptCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attachAttemptCount); - case Attributes::PartitionIdChangeCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, partitionIdChangeCount); - case Attributes::BetterPartitionAttachAttemptCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, betterPartitionAttachAttemptCount); - case Attributes::ParentChangeCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, parentChangeCount); - case Attributes::TxTotalCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txTotalCount); - case Attributes::TxUnicastCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txUnicastCount); - case Attributes::TxBroadcastCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txBroadcastCount); - case Attributes::TxAckRequestedCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txAckRequestedCount); - case Attributes::TxAckedCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txAckedCount); - case Attributes::TxNoAckRequestedCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txNoAckRequestedCount); - case Attributes::TxDataCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txDataCount); - case Attributes::TxDataPollCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txDataPollCount); - case Attributes::TxBeaconCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txBeaconCount); - case Attributes::TxBeaconRequestCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txBeaconRequestCount); - case Attributes::TxOtherCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txOtherCount); - case Attributes::TxRetryCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txRetryCount); - case Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txDirectMaxRetryExpiryCount); - case Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txIndirectMaxRetryExpiryCount); - case Attributes::TxErrCcaCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txErrCcaCount); - case Attributes::TxErrAbortCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txErrAbortCount); - case Attributes::TxErrBusyChannelCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txErrBusyChannelCount); - case Attributes::RxTotalCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxTotalCount); - case Attributes::RxUnicastCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxUnicastCount); - case Attributes::RxBroadcastCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxBroadcastCount); - case Attributes::RxDataCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxDataCount); - case Attributes::RxDataPollCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxDataPollCount); - case Attributes::RxBeaconCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxBeaconCount); - case Attributes::RxBeaconRequestCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxBeaconRequestCount); - case Attributes::RxOtherCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxOtherCount); - case Attributes::RxAddressFilteredCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxAddressFilteredCount); - case Attributes::RxDestAddrFilteredCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxDestAddrFilteredCount); - case Attributes::RxDuplicatedCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxDuplicatedCount); - case Attributes::RxErrNoFrameCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrNoFrameCount); - case Attributes::RxErrUnknownNeighborCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrUnknownNeighborCount); - case Attributes::RxErrInvalidSrcAddrCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrInvalidSrcAddrCount); - case Attributes::RxErrSecCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrSecCount); - case Attributes::RxErrFcsCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrFcsCount); - case Attributes::RxErrOtherCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rxErrOtherCount); - case Attributes::ActiveTimestamp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeTimestamp); - case Attributes::PendingTimestamp::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, pendingTimestamp); - case Attributes::Delay::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, delay); - case Attributes::SecurityPolicy::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, securityPolicy); - case Attributes::ChannelPage0Mask::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, channelPage0Mask); - case Attributes::OperationalDatasetComponents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalDatasetComponents); - case Attributes::ActiveNetworkFaultsList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeNetworkFaultsList); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace ConnectionStatus { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); - return aWriter.EndContainer(outer); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kConnectionStatus)) - { - err = DataModel::Decode(reader, connectionStatus); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace ConnectionStatus. -namespace NetworkFaultChange { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); - return aWriter.EndContainer(outer); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kCurrent)) - { - err = DataModel::Decode(reader, current); - } - else if (__context_tag == to_underlying(Fields::kPrevious)) - { - err = DataModel::Decode(reader, previous); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace NetworkFaultChange. -} // namespace Events - -} // namespace ThreadNetworkDiagnostics -namespace WiFiNetworkDiagnostics { - -namespace Commands { -namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace ResetCounts. -} // namespace Commands +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::Bssid::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, bssid); - case Attributes::SecurityType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, securityType); - case Attributes::WiFiVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, wiFiVersion); - case Attributes::ChannelNumber::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, channelNumber); - case Attributes::Rssi::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rssi); - case Attributes::BeaconLostCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, beaconLostCount); - case Attributes::BeaconRxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, beaconRxCount); - case Attributes::PacketMulticastRxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetMulticastRxCount); - case Attributes::PacketMulticastTxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetMulticastTxCount); - case Attributes::PacketUnicastRxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetUnicastRxCount); - case Attributes::PacketUnicastTxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetUnicastTxCount); - case Attributes::CurrentMaxRate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMaxRate); - case Attributes::OverrunCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, overrunCount); + case Attributes::VendorName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorName); + case Attributes::VendorID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, vendorID); + case Attributes::ProductName::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productName); + case Attributes::NodeLabel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nodeLabel); + case Attributes::HardwareVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hardwareVersion); + case Attributes::HardwareVersionString::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hardwareVersionString); + case Attributes::SoftwareVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, softwareVersion); + case Attributes::SoftwareVersionString::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, softwareVersionString); + case Attributes::ManufacturingDate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, manufacturingDate); + case Attributes::PartNumber::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, partNumber); + case Attributes::ProductURL::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productURL); + case Attributes::ProductLabel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productLabel); + case Attributes::SerialNumber::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, serialNumber); + case Attributes::Reachable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, reachable); + case Attributes::UniqueID::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, uniqueID); + case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, productAppearance); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -7729,12 +7531,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace Disconnection { +namespace StartUp { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReasonCode), reasonCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); return aWriter.EndContainer(outer); } @@ -7752,9 +7554,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kReasonCode)) + if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, reasonCode); + err = DataModel::Decode(reader, softwareVersion); } else { @@ -7763,14 +7565,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Disconnection. -namespace AssociationFailure { +} // namespace StartUp. +namespace ShutDown { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAssociationFailureCause), associationFailureCause)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); return aWriter.EndContainer(outer); } @@ -7784,32 +7584,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace ShutDown. +namespace Leave { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kAssociationFailureCause)) - { - err = DataModel::Decode(reader, associationFailureCause); - } - else if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { + return std::get(__element); } - - ReturnErrorOnFailure(err); } } -} // namespace AssociationFailure. -namespace ConnectionStatus { +} // namespace Leave. +namespace ReachableChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kConnectionStatus), connectionStatus)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); return aWriter.EndContainer(outer); } @@ -7827,9 +7631,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kConnectionStatus)) + if (__context_tag == to_underlying(Fields::kReachableNewValue)) { - err = DataModel::Decode(reader, connectionStatus); + err = DataModel::Decode(reader, reachableNewValue); } else { @@ -7838,58 +7642,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ConnectionStatus. +} // namespace ReachableChanged. } // namespace Events -} // namespace WiFiNetworkDiagnostics -namespace EthernetNetworkDiagnostics { - -namespace Commands { -namespace ResetCounts { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} +} // namespace BridgedDeviceBasicInformation +namespace Switch { -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace ResetCounts. -} // namespace Commands +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::PHYRate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, PHYRate); - case Attributes::FullDuplex::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, fullDuplex); - case Attributes::PacketRxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetRxCount); - case Attributes::PacketTxCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, packetTxCount); - case Attributes::TxErrCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, txErrCount); - case Attributes::CollisionCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, collisionCount); - case Attributes::OverrunCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, overrunCount); - case Attributes::CarrierDetect::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, carrierDetect); - case Attributes::TimeSinceReset::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeSinceReset); + case Attributes::NumberOfPositions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfPositions); + case Attributes::CurrentPosition::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPosition); + case Attributes::MultiPressMax::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, multiPressMax); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -7908,153 +7679,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace EthernetNetworkDiagnostics -namespace TimeSynchronization { -namespace Structs { - -namespace DSTOffsetStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOffset), offset); - encoder.Encode(to_underlying(Fields::kValidStarting), validStarting); - encoder.Encode(to_underlying(Fields::kValidUntil), validUntil); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kOffset)) - { - err = DataModel::Decode(reader, offset); - } - else if (__context_tag == to_underlying(Fields::kValidStarting)) - { - err = DataModel::Decode(reader, validStarting); - } - else if (__context_tag == to_underlying(Fields::kValidUntil)) - { - err = DataModel::Decode(reader, validUntil); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace DSTOffsetStruct - -namespace FabricScopedTrustedTimeSourceStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNodeID), nodeID); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNodeID)) - { - err = DataModel::Decode(reader, nodeID); - } - else if (__context_tag == to_underlying(Fields::kEndpoint)) - { - err = DataModel::Decode(reader, endpoint); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace FabricScopedTrustedTimeSourceStruct - -namespace TimeZoneStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kOffset), offset); - encoder.Encode(to_underlying(Fields::kValidAt), validAt); - encoder.Encode(to_underlying(Fields::kName), name); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kOffset)) - { - err = DataModel::Decode(reader, offset); - } - else if (__context_tag == to_underlying(Fields::kValidAt)) - { - err = DataModel::Decode(reader, validAt); - } - else if (__context_tag == to_underlying(Fields::kName)) - { - err = DataModel::Decode(reader, name); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} - -} // namespace TimeZoneStruct - -namespace TrustedTimeSourceStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - encoder.Encode(to_underlying(Fields::kNodeID), nodeID); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - return encoder.Finalize(); +namespace Events { +namespace SwitchLatched { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8071,17 +7703,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else if (__context_tag == to_underlying(Fields::kNodeID)) - { - err = DataModel::Decode(reader, nodeID); - } - else if (__context_tag == to_underlying(Fields::kEndpoint)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, newPosition); } else { @@ -8090,19 +7714,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace TrustedTimeSourceStruct -} // namespace Structs - -namespace Commands { -namespace SetUTCTime { +} // namespace SwitchLatched. +namespace InitialPress { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kUTCTime), UTCTime); - encoder.Encode(to_underlying(Fields::kGranularity), granularity); - encoder.Encode(to_underlying(Fields::kTimeSource), timeSource); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8119,17 +7738,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kUTCTime)) - { - err = DataModel::Decode(reader, UTCTime); - } - else if (__context_tag == to_underlying(Fields::kGranularity)) - { - err = DataModel::Decode(reader, granularity); - } - else if (__context_tag == to_underlying(Fields::kTimeSource)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, timeSource); + err = DataModel::Decode(reader, newPosition); } else { @@ -8138,13 +7749,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetUTCTime. -namespace SetTrustedTimeSource { +} // namespace InitialPress. +namespace LongPress { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTrustedTimeSource), trustedTimeSource); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8161,9 +7773,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTrustedTimeSource)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, trustedTimeSource); + err = DataModel::Decode(reader, newPosition); } else { @@ -8172,13 +7784,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTrustedTimeSource. -namespace SetTimeZone { +} // namespace LongPress. +namespace ShortRelease { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTimeZone), timeZone); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8195,9 +7808,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTimeZone)) + if (__context_tag == to_underlying(Fields::kPreviousPosition)) { - err = DataModel::Decode(reader, timeZone); + err = DataModel::Decode(reader, previousPosition); } else { @@ -8206,13 +7819,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTimeZone. -namespace SetTimeZoneResponse { +} // namespace ShortRelease. +namespace LongRelease { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDSTOffsetRequired), DSTOffsetRequired); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8229,9 +7843,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDSTOffsetRequired)) + if (__context_tag == to_underlying(Fields::kPreviousPosition)) { - err = DataModel::Decode(reader, DSTOffsetRequired); + err = DataModel::Decode(reader, previousPosition); } else { @@ -8240,13 +7854,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTimeZoneResponse. -namespace SetDSTOffset { +} // namespace LongRelease. +namespace MultiPressOngoing { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDSTOffset), DSTOffset); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentNumberOfPressesCounted), currentNumberOfPressesCounted)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8263,9 +7880,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDSTOffset)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, DSTOffset); + err = DataModel::Decode(reader, newPosition); + } + else if (__context_tag == to_underlying(Fields::kCurrentNumberOfPressesCounted)) + { + err = DataModel::Decode(reader, currentNumberOfPressesCounted); } else { @@ -8274,13 +7895,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetDSTOffset. -namespace SetDefaultNTP { +} // namespace MultiPressOngoing. +namespace MultiPressComplete { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDefaultNTP), defaultNTP); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalNumberOfPressesCounted), totalNumberOfPressesCounted)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8297,9 +7921,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDefaultNTP)) + if (__context_tag == to_underlying(Fields::kPreviousPosition)) { - err = DataModel::Decode(reader, defaultNTP); + err = DataModel::Decode(reader, previousPosition); + } + else if (__context_tag == to_underlying(Fields::kTotalNumberOfPressesCounted)) + { + err = DataModel::Decode(reader, totalNumberOfPressesCounted); } else { @@ -8308,87 +7936,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetDefaultNTP. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::UTCTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, UTCTime); - case Attributes::Granularity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, granularity); - case Attributes::TimeSource::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeSource); - case Attributes::TrustedTimeSource::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, trustedTimeSource); - case Attributes::DefaultNTP::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, defaultNTP); - case Attributes::TimeZone::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeZone); - case Attributes::DSTOffset::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, DSTOffset); - case Attributes::LocalTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, localTime); - case Attributes::TimeZoneDatabase::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeZoneDatabase); - case Attributes::NTPServerAvailable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, NTPServerAvailable); - case Attributes::TimeZoneListMaxSize::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeZoneListMaxSize); - case Attributes::DSTOffsetListMaxSize::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, DSTOffsetListMaxSize); - case Attributes::SupportsDNSResolve::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportsDNSResolve); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes +} // namespace MultiPressComplete. +} // namespace Events -namespace Events { -namespace DSTTableEmpty { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} +} // namespace Switch +namespace AdministratorCommissioning { -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace DSTTableEmpty. -namespace DSTStatus { +namespace Commands { +namespace OpenCommissioningWindow { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffsetActive), DSTOffsetActive)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommissioningTimeout), commissioningTimeout); + encoder.Encode(to_underlying(Fields::kPAKEPasscodeVerifier), PAKEPasscodeVerifier); + encoder.Encode(to_underlying(Fields::kDiscriminator), discriminator); + encoder.Encode(to_underlying(Fields::kIterations), iterations); + encoder.Encode(to_underlying(Fields::kSalt), salt); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8405,9 +7969,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kDSTOffsetActive)) + if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) { - err = DataModel::Decode(reader, DSTOffsetActive); + err = DataModel::Decode(reader, commissioningTimeout); + } + else if (__context_tag == to_underlying(Fields::kPAKEPasscodeVerifier)) + { + err = DataModel::Decode(reader, PAKEPasscodeVerifier); + } + else if (__context_tag == to_underlying(Fields::kDiscriminator)) + { + err = DataModel::Decode(reader, discriminator); + } + else if (__context_tag == to_underlying(Fields::kIterations)) + { + err = DataModel::Decode(reader, iterations); + } + else if (__context_tag == to_underlying(Fields::kSalt)) + { + err = DataModel::Decode(reader, salt); } else { @@ -8416,15 +7996,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DSTStatus. -namespace TimeZoneStatus { +} // namespace OpenCommissioningWindow. +namespace OpenBasicCommissioningWindow { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOffset), offset)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kName), name)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommissioningTimeout), commissioningTimeout); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8441,13 +8019,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kOffset)) - { - err = DataModel::Decode(reader, offset); - } - else if (__context_tag == to_underlying(Fields::kName)) + if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, commissioningTimeout); } else { @@ -8456,13 +8030,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace TimeZoneStatus. -namespace TimeFailure { +} // namespace OpenBasicCommissioningWindow. +namespace RevokeCommissioning { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8477,40 +8050,70 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace TimeFailure. -namespace MissingTrustedTimeSource { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} +} // namespace RevokeCommissioning. +} // namespace Commands -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + case Attributes::WindowStatus::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, windowStatus); + case Attributes::AdminFabricIndex::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, adminFabricIndex); + case Attributes::AdminVendorId::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, adminVendorId); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace MissingTrustedTimeSource. -} // namespace Events +} // namespace Attributes -} // namespace TimeSynchronization -namespace BridgedDeviceBasicInformation { +namespace Events {} // namespace Events + +} // namespace AdministratorCommissioning +namespace OperationalCredentials { namespace Structs { -namespace ProductAppearanceStruct { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +namespace FabricDescriptorStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFinish), finish); - encoder.Encode(to_underlying(Fields::kPrimaryColor), primaryColor); + + encoder.Encode(to_underlying(Fields::kRootPublicKey), rootPublicKey); + encoder.Encode(to_underlying(Fields::kVendorID), vendorID); + encoder.Encode(to_underlying(Fields::kFabricID), fabricID); + encoder.Encode(to_underlying(Fields::kNodeID), nodeID); + encoder.Encode(to_underlying(Fields::kLabel), label); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -8528,13 +8131,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kFinish)) + if (__context_tag == to_underlying(Fields::kRootPublicKey)) { - err = DataModel::Decode(reader, finish); + err = DataModel::Decode(reader, rootPublicKey); } - else if (__context_tag == to_underlying(Fields::kPrimaryColor)) + else if (__context_tag == to_underlying(Fields::kVendorID)) { - err = DataModel::Decode(reader, primaryColor); + err = DataModel::Decode(reader, vendorID); + } + else if (__context_tag == to_underlying(Fields::kFabricID)) + { + err = DataModel::Decode(reader, fabricID); + } + else if (__context_tag == to_underlying(Fields::kNodeID)) + { + err = DataModel::Decode(reader, nodeID); + } + else if (__context_tag == to_underlying(Fields::kLabel)) + { + err = DataModel::Decode(reader, label); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -8544,74 +8163,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ProductAppearanceStruct -} // namespace Structs +} // namespace FabricDescriptorStruct -namespace Commands {} // namespace Commands +namespace NOCStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const { - switch (path.mAttributeId) - { - case Attributes::VendorName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorName); - case Attributes::VendorID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, vendorID); - case Attributes::ProductName::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productName); - case Attributes::NodeLabel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, nodeLabel); - case Attributes::HardwareVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hardwareVersion); - case Attributes::HardwareVersionString::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hardwareVersionString); - case Attributes::SoftwareVersion::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, softwareVersion); - case Attributes::SoftwareVersionString::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, softwareVersionString); - case Attributes::ManufacturingDate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, manufacturingDate); - case Attributes::PartNumber::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, partNumber); - case Attributes::ProductURL::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productURL); - case Attributes::ProductLabel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productLabel); - case Attributes::SerialNumber::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, serialNumber); - case Attributes::Reachable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reachable); - case Attributes::UniqueID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, uniqueID); - case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, productAppearance); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); } -} // namespace Attributes -namespace Events { -namespace StartUp { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); - return aWriter.EndContainer(outer); + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kNoc), noc); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kIcac), icac); + } + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8628,9 +8212,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kSoftwareVersion)) + if (__context_tag == to_underlying(Fields::kNoc)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, noc); + } + else if (__context_tag == to_underlying(Fields::kIcac)) + { + err = DataModel::Decode(reader, icac); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -8639,13 +8231,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StartUp. -namespace ShutDown { + +} // namespace NOCStruct +} // namespace Structs + +namespace Commands { +namespace AttestationRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAttestationNonce), attestationNonce); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8658,37 +8254,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace ShutDown. -namespace Leave { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kAttestationNonce)) + { + err = DataModel::Decode(reader, attestationNonce); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace Leave. -namespace ReachableChanged { +} // namespace AttestationRequest. +namespace AttestationResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kReachableNewValue), reachableNewValue)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAttestationElements), attestationElements); + encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8705,9 +8293,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kReachableNewValue)) + if (__context_tag == to_underlying(Fields::kAttestationElements)) { - err = DataModel::Decode(reader, reachableNewValue); + err = DataModel::Decode(reader, attestationElements); + } + else if (__context_tag == to_underlying(Fields::kAttestationSignature)) + { + err = DataModel::Decode(reader, attestationSignature); } else { @@ -8716,51 +8308,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ReachableChanged. -} // namespace Events - -} // namespace BridgedDeviceBasicInformation -namespace Switch { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::NumberOfPositions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfPositions); - case Attributes::CurrentPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPosition); - case Attributes::MultiPressMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, multiPressMax); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace SwitchLatched { +} // namespace AttestationResponse. +namespace CertificateChainRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCertificateType), certificateType); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8777,9 +8331,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewPosition)) + if (__context_tag == to_underlying(Fields::kCertificateType)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, certificateType); } else { @@ -8788,14 +8342,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SwitchLatched. -namespace InitialPress { +} // namespace CertificateChainRequest. +namespace CertificateChainResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCertificate), certificate); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8812,9 +8365,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewPosition)) + if (__context_tag == to_underlying(Fields::kCertificate)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, certificate); } else { @@ -8823,14 +8376,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InitialPress. -namespace LongPress { +} // namespace CertificateChainResponse. +namespace CSRRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCSRNonce), CSRNonce); + encoder.Encode(to_underlying(Fields::kIsForUpdateNOC), isForUpdateNOC); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8847,9 +8400,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewPosition)) + if (__context_tag == to_underlying(Fields::kCSRNonce)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, CSRNonce); + } + else if (__context_tag == to_underlying(Fields::kIsForUpdateNOC)) + { + err = DataModel::Decode(reader, isForUpdateNOC); } else { @@ -8858,14 +8415,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LongPress. -namespace ShortRelease { +} // namespace CSRRequest. +namespace CSRResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNOCSRElements), NOCSRElements); + encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8882,9 +8439,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPreviousPosition)) + if (__context_tag == to_underlying(Fields::kNOCSRElements)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, NOCSRElements); + } + else if (__context_tag == to_underlying(Fields::kAttestationSignature)) + { + err = DataModel::Decode(reader, attestationSignature); } else { @@ -8893,14 +8454,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ShortRelease. -namespace LongRelease { +} // namespace CSRResponse. +namespace AddNOC { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNOCValue), NOCValue); + encoder.Encode(to_underlying(Fields::kICACValue), ICACValue); + encoder.Encode(to_underlying(Fields::kIPKValue), IPKValue); + encoder.Encode(to_underlying(Fields::kCaseAdminSubject), caseAdminSubject); + encoder.Encode(to_underlying(Fields::kAdminVendorId), adminVendorId); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8917,9 +8481,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPreviousPosition)) + if (__context_tag == to_underlying(Fields::kNOCValue)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, NOCValue); + } + else if (__context_tag == to_underlying(Fields::kICACValue)) + { + err = DataModel::Decode(reader, ICACValue); + } + else if (__context_tag == to_underlying(Fields::kIPKValue)) + { + err = DataModel::Decode(reader, IPKValue); + } + else if (__context_tag == to_underlying(Fields::kCaseAdminSubject)) + { + err = DataModel::Decode(reader, caseAdminSubject); + } + else if (__context_tag == to_underlying(Fields::kAdminVendorId)) + { + err = DataModel::Decode(reader, adminVendorId); } else { @@ -8928,16 +8508,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LongRelease. -namespace MultiPressOngoing { +} // namespace AddNOC. +namespace UpdateNOC { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kNewPosition), newPosition)); - ReturnErrorOnFailure( - DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentNumberOfPressesCounted), currentNumberOfPressesCounted)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNOCValue), NOCValue); + encoder.Encode(to_underlying(Fields::kICACValue), ICACValue); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8954,13 +8532,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewPosition)) + if (__context_tag == to_underlying(Fields::kNOCValue)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, NOCValue); } - else if (__context_tag == to_underlying(Fields::kCurrentNumberOfPressesCounted)) + else if (__context_tag == to_underlying(Fields::kICACValue)) { - err = DataModel::Decode(reader, currentNumberOfPressesCounted); + err = DataModel::Decode(reader, ICACValue); } else { @@ -8969,16 +8547,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MultiPressOngoing. -namespace MultiPressComplete { +} // namespace UpdateNOC. +namespace NOCResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPreviousPosition), previousPosition)); - ReturnErrorOnFailure( - DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalNumberOfPressesCounted), totalNumberOfPressesCounted)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatusCode), statusCode); + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + encoder.Encode(to_underlying(Fields::kDebugText), debugText); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8995,13 +8572,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPreviousPosition)) + if (__context_tag == to_underlying(Fields::kStatusCode)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, statusCode); } - else if (__context_tag == to_underlying(Fields::kTotalNumberOfPressesCounted)) + else if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, totalNumberOfPressesCounted); + err = DataModel::Decode(reader, fabricIndex); + } + else if (__context_tag == to_underlying(Fields::kDebugText)) + { + err = DataModel::Decode(reader, debugText); } else { @@ -9010,22 +8591,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MultiPressComplete. -} // namespace Events - -} // namespace Switch -namespace AdministratorCommissioning { - -namespace Commands { -namespace OpenCommissioningWindow { +} // namespace NOCResponse. +namespace UpdateFabricLabel { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCommissioningTimeout), commissioningTimeout); - encoder.Encode(to_underlying(Fields::kPAKEPasscodeVerifier), PAKEPasscodeVerifier); - encoder.Encode(to_underlying(Fields::kDiscriminator), discriminator); - encoder.Encode(to_underlying(Fields::kIterations), iterations); - encoder.Encode(to_underlying(Fields::kSalt), salt); + encoder.Encode(to_underlying(Fields::kLabel), label); return encoder.Finalize(); } @@ -9043,25 +8614,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) - { - err = DataModel::Decode(reader, commissioningTimeout); - } - else if (__context_tag == to_underlying(Fields::kPAKEPasscodeVerifier)) - { - err = DataModel::Decode(reader, PAKEPasscodeVerifier); - } - else if (__context_tag == to_underlying(Fields::kDiscriminator)) - { - err = DataModel::Decode(reader, discriminator); - } - else if (__context_tag == to_underlying(Fields::kIterations)) - { - err = DataModel::Decode(reader, iterations); - } - else if (__context_tag == to_underlying(Fields::kSalt)) + if (__context_tag == to_underlying(Fields::kLabel)) { - err = DataModel::Decode(reader, salt); + err = DataModel::Decode(reader, label); } else { @@ -9069,13 +8624,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } -} -} // namespace OpenCommissioningWindow. -namespace OpenBasicCommissioningWindow { +} +} // namespace UpdateFabricLabel. +namespace RemoveFabric { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCommissioningTimeout), commissioningTimeout); + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); return encoder.Finalize(); } @@ -9093,9 +8648,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) + if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, commissioningTimeout); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -9104,11 +8659,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OpenBasicCommissioningWindow. -namespace RevokeCommissioning { +} // namespace RemoveFabric. +namespace AddTrustedRootCertificate { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kRootCACertificate), rootCACertificate); return encoder.Finalize(); } @@ -9122,9 +8678,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kRootCACertificate)) + { + err = DataModel::Decode(reader, rootCACertificate); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace RevokeCommissioning. +} // namespace AddTrustedRootCertificate. } // namespace Commands namespace Attributes { @@ -9132,12 +8701,18 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::WindowStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, windowStatus); - case Attributes::AdminFabricIndex::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, adminFabricIndex); - case Attributes::AdminVendorId::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, adminVendorId); + case Attributes::NOCs::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, NOCs); + case Attributes::Fabrics::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fabrics); + case Attributes::SupportedFabrics::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedFabrics); + case Attributes::CommissionedFabrics::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, commissionedFabrics); + case Attributes::TrustedRootCertificates::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, trustedRootCertificates); + case Attributes::CurrentFabricIndex::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentFabricIndex); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -9158,11 +8733,11 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace AdministratorCommissioning -namespace OperationalCredentials { +} // namespace OperationalCredentials +namespace GroupKeyManagement { namespace Structs { -namespace FabricDescriptorStruct { +namespace GroupInfoMapStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { return DoEncode(aWriter, aTag, NullOptional); @@ -9178,11 +8753,9 @@ CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optiona DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRootPublicKey), rootPublicKey); - encoder.Encode(to_underlying(Fields::kVendorID), vendorID); - encoder.Encode(to_underlying(Fields::kFabricID), fabricID); - encoder.Encode(to_underlying(Fields::kNodeID), nodeID); - encoder.Encode(to_underlying(Fields::kLabel), label); + encoder.Encode(to_underlying(Fields::kGroupId), groupId); + encoder.Encode(to_underlying(Fields::kEndpoints), endpoints); + encoder.Encode(to_underlying(Fields::kGroupName), groupName); if (aAccessingFabricIndex.HasValue()) { encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); @@ -9205,25 +8778,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kRootPublicKey)) - { - err = DataModel::Decode(reader, rootPublicKey); - } - else if (__context_tag == to_underlying(Fields::kVendorID)) - { - err = DataModel::Decode(reader, vendorID); - } - else if (__context_tag == to_underlying(Fields::kFabricID)) + if (__context_tag == to_underlying(Fields::kGroupId)) { - err = DataModel::Decode(reader, fabricID); + err = DataModel::Decode(reader, groupId); } - else if (__context_tag == to_underlying(Fields::kNodeID)) + else if (__context_tag == to_underlying(Fields::kEndpoints)) { - err = DataModel::Decode(reader, nodeID); + err = DataModel::Decode(reader, endpoints); } - else if (__context_tag == to_underlying(Fields::kLabel)) + else if (__context_tag == to_underlying(Fields::kGroupName)) { - err = DataModel::Decode(reader, label); + err = DataModel::Decode(reader, groupName); } else if (__context_tag == to_underlying(Fields::kFabricIndex)) { @@ -9237,9 +8802,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace FabricDescriptorStruct +} // namespace GroupInfoMapStruct -namespace NOCStruct { +namespace GroupKeyMapStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { return DoEncode(aWriter, aTag, NullOptional); @@ -9252,18 +8817,11 @@ CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIn CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kNoc), noc); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kIcac), icac); - } + encoder.Encode(to_underlying(Fields::kGroupId), groupId); + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); if (aAccessingFabricIndex.HasValue()) { encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); @@ -9286,13 +8844,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNoc)) + if (__context_tag == to_underlying(Fields::kGroupId)) { - err = DataModel::Decode(reader, noc); + err = DataModel::Decode(reader, groupId); } - else if (__context_tag == to_underlying(Fields::kIcac)) + else if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, icac); + err = DataModel::Decode(reader, groupKeySetID); } else if (__context_tag == to_underlying(Fields::kFabricIndex)) { @@ -9306,15 +8864,86 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace NOCStruct +} // namespace GroupKeyMapStruct + +namespace GroupKeySetStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); + encoder.Encode(to_underlying(Fields::kGroupKeySecurityPolicy), groupKeySecurityPolicy); + encoder.Encode(to_underlying(Fields::kEpochKey0), epochKey0); + encoder.Encode(to_underlying(Fields::kEpochStartTime0), epochStartTime0); + encoder.Encode(to_underlying(Fields::kEpochKey1), epochKey1); + encoder.Encode(to_underlying(Fields::kEpochStartTime1), epochStartTime1); + encoder.Encode(to_underlying(Fields::kEpochKey2), epochKey2); + encoder.Encode(to_underlying(Fields::kEpochStartTime2), epochStartTime2); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) + { + err = DataModel::Decode(reader, groupKeySetID); + } + else if (__context_tag == to_underlying(Fields::kGroupKeySecurityPolicy)) + { + err = DataModel::Decode(reader, groupKeySecurityPolicy); + } + else if (__context_tag == to_underlying(Fields::kEpochKey0)) + { + err = DataModel::Decode(reader, epochKey0); + } + else if (__context_tag == to_underlying(Fields::kEpochStartTime0)) + { + err = DataModel::Decode(reader, epochStartTime0); + } + else if (__context_tag == to_underlying(Fields::kEpochKey1)) + { + err = DataModel::Decode(reader, epochKey1); + } + else if (__context_tag == to_underlying(Fields::kEpochStartTime1)) + { + err = DataModel::Decode(reader, epochStartTime1); + } + else if (__context_tag == to_underlying(Fields::kEpochKey2)) + { + err = DataModel::Decode(reader, epochKey2); + } + else if (__context_tag == to_underlying(Fields::kEpochStartTime2)) + { + err = DataModel::Decode(reader, epochStartTime2); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace GroupKeySetStruct } // namespace Structs namespace Commands { -namespace AttestationRequest { +namespace KeySetWrite { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAttestationNonce), attestationNonce); + encoder.Encode(to_underlying(Fields::kGroupKeySet), groupKeySet); return encoder.Finalize(); } @@ -9332,9 +8961,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAttestationNonce)) + if (__context_tag == to_underlying(Fields::kGroupKeySet)) { - err = DataModel::Decode(reader, attestationNonce); + err = DataModel::Decode(reader, groupKeySet); } else { @@ -9343,13 +8972,80 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AttestationRequest. -namespace AttestationResponse { +} // namespace KeySetWrite. +namespace KeySetRead { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) + { + err = DataModel::Decode(reader, groupKeySetID); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace KeySetRead. +namespace KeySetReadResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupKeySet), groupKeySet); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupKeySet)) + { + err = DataModel::Decode(reader, groupKeySet); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace KeySetReadResponse. +namespace KeySetRemove { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAttestationElements), attestationElements); - encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); return encoder.Finalize(); } @@ -9367,13 +9063,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAttestationElements)) - { - err = DataModel::Decode(reader, attestationElements); - } - else if (__context_tag == to_underlying(Fields::kAttestationSignature)) + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, attestationSignature); + err = DataModel::Decode(reader, groupKeySetID); } else { @@ -9382,12 +9074,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AttestationResponse. -namespace CertificateChainRequest { +} // namespace KeySetRemove. +namespace KeySetReadAllIndices { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCertificateType), certificateType); return encoder.Finalize(); } @@ -9401,27 +9092,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kCertificateType)) - { - err = DataModel::Decode(reader, certificateType); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace CertificateChainRequest. -namespace CertificateChainResponse { +} // namespace KeySetReadAllIndices. +namespace KeySetReadAllIndicesResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCertificate), certificate); + encoder.Encode(to_underlying(Fields::kGroupKeySetIDs), groupKeySetIDs); return encoder.Finalize(); } @@ -9439,9 +9117,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCertificate)) + if (__context_tag == to_underlying(Fields::kGroupKeySetIDs)) { - err = DataModel::Decode(reader, certificate); + err = DataModel::Decode(reader, groupKeySetIDs); } else { @@ -9450,14 +9128,236 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CertificateChainResponse. -namespace CSRRequest { +} // namespace KeySetReadAllIndicesResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GroupKeyMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, groupKeyMap); + case Attributes::GroupTable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, groupTable); + case Attributes::MaxGroupsPerFabric::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxGroupsPerFabric); + case Attributes::MaxGroupKeysPerFabric::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxGroupKeysPerFabric); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace GroupKeyManagement +namespace FixedLabel { +namespace Structs {} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::LabelList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, labelList); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace FixedLabel +namespace UserLabel { +namespace Structs {} // namespace Structs + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::LabelList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, labelList); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace UserLabel +namespace ProxyConfiguration { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ProxyConfiguration +namespace ProxyDiscovery { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ProxyDiscovery +namespace ProxyValid { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ProxyValid +namespace BooleanState { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::StateValue::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, stateValue); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace StateChange { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCSRNonce), CSRNonce); - encoder.Encode(to_underlying(Fields::kIsForUpdateNOC), isForUpdateNOC); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStateValue), stateValue)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -9474,13 +9374,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCSRNonce)) - { - err = DataModel::Decode(reader, CSRNonce); - } - else if (__context_tag == to_underlying(Fields::kIsForUpdateNOC)) + if (__context_tag == to_underlying(Fields::kStateValue)) { - err = DataModel::Decode(reader, isForUpdateNOC); + err = DataModel::Decode(reader, stateValue); } else { @@ -9489,55 +9385,43 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CSRRequest. -namespace CSRResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +} // namespace StateChange. +} // namespace Events + +} // namespace BooleanState +namespace IcdManagement { +namespace Structs { + +namespace MonitoringRegistrationStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNOCSRElements), NOCSRElements); - encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); - return encoder.Finalize(); + return DoEncode(aWriter, aTag, NullOptional); } -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const { - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +{ + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); - if (__context_tag == to_underlying(Fields::kNOCSRElements)) - { - err = DataModel::Decode(reader, NOCSRElements); - } - else if (__context_tag == to_underlying(Fields::kAttestationSignature)) - { - err = DataModel::Decode(reader, attestationSignature); - } - else - { - } + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - ReturnErrorOnFailure(err); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); } -} -} // namespace CSRResponse. -namespace AddNOC { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNOCValue), NOCValue); - encoder.Encode(to_underlying(Fields::kICACValue), ICACValue); - encoder.Encode(to_underlying(Fields::kIPKValue), IPKValue); - encoder.Encode(to_underlying(Fields::kCaseAdminSubject), caseAdminSubject); - encoder.Encode(to_underlying(Fields::kAdminVendorId), adminVendorId); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kMonitoredSubject), monitoredSubject); + } + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -9555,25 +9439,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNOCValue)) - { - err = DataModel::Decode(reader, NOCValue); - } - else if (__context_tag == to_underlying(Fields::kICACValue)) - { - err = DataModel::Decode(reader, ICACValue); - } - else if (__context_tag == to_underlying(Fields::kIPKValue)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - err = DataModel::Decode(reader, IPKValue); + err = DataModel::Decode(reader, checkInNodeID); } - else if (__context_tag == to_underlying(Fields::kCaseAdminSubject)) + else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) { - err = DataModel::Decode(reader, caseAdminSubject); + err = DataModel::Decode(reader, monitoredSubject); } - else if (__context_tag == to_underlying(Fields::kAdminVendorId)) + else if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, adminVendorId); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -9582,13 +9458,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddNOC. -namespace UpdateNOC { + +} // namespace MonitoringRegistrationStruct +} // namespace Structs + +namespace Commands { +namespace RegisterClient { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNOCValue), NOCValue); - encoder.Encode(to_underlying(Fields::kICACValue), ICACValue); + encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); + encoder.Encode(to_underlying(Fields::kMonitoredSubject), monitoredSubject); + encoder.Encode(to_underlying(Fields::kKey), key); + encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); return encoder.Finalize(); } @@ -9606,13 +9488,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNOCValue)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - err = DataModel::Decode(reader, NOCValue); + err = DataModel::Decode(reader, checkInNodeID); } - else if (__context_tag == to_underlying(Fields::kICACValue)) + else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) { - err = DataModel::Decode(reader, ICACValue); + err = DataModel::Decode(reader, monitoredSubject); + } + else if (__context_tag == to_underlying(Fields::kKey)) + { + err = DataModel::Decode(reader, key); + } + else if (__context_tag == to_underlying(Fields::kVerificationKey)) + { + err = DataModel::Decode(reader, verificationKey); } else { @@ -9621,14 +9511,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UpdateNOC. -namespace NOCResponse { +} // namespace RegisterClient. +namespace RegisterClientResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatusCode), statusCode); - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); + encoder.Encode(to_underlying(Fields::kICDCounter), ICDCounter); return encoder.Finalize(); } @@ -9646,17 +9534,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatusCode)) - { - err = DataModel::Decode(reader, statusCode); - } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else if (__context_tag == to_underlying(Fields::kDebugText)) + if (__context_tag == to_underlying(Fields::kICDCounter)) { - err = DataModel::Decode(reader, debugText); + err = DataModel::Decode(reader, ICDCounter); } else { @@ -9665,12 +9545,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace NOCResponse. -namespace UpdateFabricLabel { +} // namespace RegisterClientResponse. +namespace UnregisterClient { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLabel), label); + encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); + encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); return encoder.Finalize(); } @@ -9688,9 +9569,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLabel)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - err = DataModel::Decode(reader, label); + err = DataModel::Decode(reader, checkInNodeID); + } + else if (__context_tag == to_underlying(Fields::kVerificationKey)) + { + err = DataModel::Decode(reader, verificationKey); } else { @@ -9699,12 +9584,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UpdateFabricLabel. -namespace RemoveFabric { +} // namespace UnregisterClient. +namespace StayActiveRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); return encoder.Finalize(); } @@ -9718,27 +9602,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace RemoveFabric. -namespace AddTrustedRootCertificate { +} // namespace StayActiveRequest. +namespace StayActiveResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRootCACertificate), rootCACertificate); + encoder.Encode(to_underlying(Fields::kPromisedActiveDuration), promisedActiveDuration); return encoder.Finalize(); } @@ -9756,9 +9627,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kRootCACertificate)) + if (__context_tag == to_underlying(Fields::kPromisedActiveDuration)) { - err = DataModel::Decode(reader, rootCACertificate); + err = DataModel::Decode(reader, promisedActiveDuration); } else { @@ -9767,7 +9638,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddTrustedRootCertificate. +} // namespace StayActiveResponse. } // namespace Commands namespace Attributes { @@ -9775,18 +9646,24 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::NOCs::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, NOCs); - case Attributes::Fabrics::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, fabrics); - case Attributes::SupportedFabrics::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedFabrics); - case Attributes::CommissionedFabrics::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, commissionedFabrics); - case Attributes::TrustedRootCertificates::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, trustedRootCertificates); - case Attributes::CurrentFabricIndex::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentFabricIndex); + case Attributes::IdleModeDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, idleModeDuration); + case Attributes::ActiveModeDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeModeDuration); + case Attributes::ActiveModeThreshold::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeModeThreshold); + case Attributes::RegisteredClients::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, registeredClients); + case Attributes::ICDCounter::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, ICDCounter); + case Attributes::ClientsSupportedPerFabric::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clientsSupportedPerFabric); + case Attributes::UserActiveModeTriggerHint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userActiveModeTriggerHint); + case Attributes::UserActiveModeTriggerInstruction::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, userActiveModeTriggerInstruction); + case Attributes::OperatingMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operatingMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -9800,41 +9677,44 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, clusterRevision); default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace OperationalCredentials -namespace GroupKeyManagement { -namespace Structs { - -namespace GroupInfoMapStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); + return CHIP_NO_ERROR; + } } +} // namespace Attributes -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +namespace Events { +namespace OnTransitionToActiveMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); } -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - encoder.Encode(to_underlying(Fields::kGroupId), groupId); - encoder.Encode(to_underlying(Fields::kEndpoints), endpoints); - encoder.Encode(to_underlying(Fields::kGroupName), groupName); - if (aAccessingFabricIndex.HasValue()) + detail::StructDecodeIterator __iterator(reader); + while (true) { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } +} +} // namespace OnTransitionToActiveMode. +} // namespace Events + +} // namespace IcdManagement +namespace Timer { +namespace Commands { +namespace SetTimer { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewTime), newTime); return encoder.Finalize(); } @@ -9852,21 +9732,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupId)) - { - err = DataModel::Decode(reader, groupId); - } - else if (__context_tag == to_underlying(Fields::kEndpoints)) - { - err = DataModel::Decode(reader, endpoints); - } - else if (__context_tag == to_underlying(Fields::kGroupName)) - { - err = DataModel::Decode(reader, groupName); - } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + if (__context_tag == to_underlying(Fields::kNewTime)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, newTime); } else { @@ -9875,32 +9743,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace GroupInfoMapStruct - -namespace GroupKeyMapStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} - -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} - -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +} // namespace SetTimer. +namespace ResetTimer { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - encoder.Encode(to_underlying(Fields::kGroupId), groupId); - encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - return encoder.Finalize(); } @@ -9914,44 +9761,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kGroupId)) - { - err = DataModel::Decode(reader, groupId); - } - else if (__context_tag == to_underlying(Fields::kGroupKeySetID)) - { - err = DataModel::Decode(reader, groupKeySetID); - } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else - { - } - - ReturnErrorOnFailure(err); } } - -} // namespace GroupKeyMapStruct - -namespace GroupKeySetStruct { +} // namespace ResetTimer. +namespace AddTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); - encoder.Encode(to_underlying(Fields::kGroupKeySecurityPolicy), groupKeySecurityPolicy); - encoder.Encode(to_underlying(Fields::kEpochKey0), epochKey0); - encoder.Encode(to_underlying(Fields::kEpochStartTime0), epochStartTime0); - encoder.Encode(to_underlying(Fields::kEpochKey1), epochKey1); - encoder.Encode(to_underlying(Fields::kEpochStartTime1), epochStartTime1); - encoder.Encode(to_underlying(Fields::kEpochKey2), epochKey2); - encoder.Encode(to_underlying(Fields::kEpochStartTime2), epochStartTime2); + encoder.Encode(to_underlying(Fields::kAdditionalTime), additionalTime); return encoder.Finalize(); } @@ -9969,37 +9786,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupKeySetID)) - { - err = DataModel::Decode(reader, groupKeySetID); - } - else if (__context_tag == to_underlying(Fields::kGroupKeySecurityPolicy)) - { - err = DataModel::Decode(reader, groupKeySecurityPolicy); - } - else if (__context_tag == to_underlying(Fields::kEpochKey0)) - { - err = DataModel::Decode(reader, epochKey0); - } - else if (__context_tag == to_underlying(Fields::kEpochStartTime0)) - { - err = DataModel::Decode(reader, epochStartTime0); - } - else if (__context_tag == to_underlying(Fields::kEpochKey1)) - { - err = DataModel::Decode(reader, epochKey1); - } - else if (__context_tag == to_underlying(Fields::kEpochStartTime1)) - { - err = DataModel::Decode(reader, epochStartTime1); - } - else if (__context_tag == to_underlying(Fields::kEpochKey2)) - { - err = DataModel::Decode(reader, epochKey2); - } - else if (__context_tag == to_underlying(Fields::kEpochStartTime2)) + if (__context_tag == to_underlying(Fields::kAdditionalTime)) { - err = DataModel::Decode(reader, epochStartTime2); + err = DataModel::Decode(reader, additionalTime); } else { @@ -10008,16 +9797,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace GroupKeySetStruct -} // namespace Structs - -namespace Commands { -namespace KeySetWrite { +} // namespace AddTime. +namespace ReduceTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySet), groupKeySet); + encoder.Encode(to_underlying(Fields::kTimeReduction), timeReduction); return encoder.Finalize(); } @@ -10035,9 +9820,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupKeySet)) + if (__context_tag == to_underlying(Fields::kTimeReduction)) { - err = DataModel::Decode(reader, groupKeySet); + err = DataModel::Decode(reader, timeReduction); } else { @@ -10046,12 +9831,49 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace KeySetWrite. -namespace KeySetRead { +} // namespace ReduceTime. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SetTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setTime); + case Attributes::TimeRemaining::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timeRemaining); + case Attributes::TimerState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, timerState); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace Timer +namespace OvenCavityOperationalState { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace Pause { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); return encoder.Finalize(); } @@ -10065,27 +9887,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kGroupKeySetID)) - { - err = DataModel::Decode(reader, groupKeySetID); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace KeySetRead. -namespace KeySetReadResponse { +} // namespace Pause. +namespace Stop { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySet), groupKeySet); return encoder.Finalize(); } @@ -10099,27 +9907,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kGroupKeySet)) - { - err = DataModel::Decode(reader, groupKeySet); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace KeySetReadResponse. -namespace KeySetRemove { +} // namespace Stop. +namespace Start { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); return encoder.Finalize(); } @@ -10131,25 +9925,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) auto __element = __iterator.Next(); if (std::holds_alternative(__element)) { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kGroupKeySetID)) - { - err = DataModel::Decode(reader, groupKeySetID); - } - else - { + return std::get(__element); } - - ReturnErrorOnFailure(err); } } -} // namespace KeySetRemove. -namespace KeySetReadAllIndices { +} // namespace Start. +namespace Resume { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -10168,12 +9949,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace KeySetReadAllIndices. -namespace KeySetReadAllIndicesResponse { +} // namespace Resume. +namespace OperationalCommandResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kGroupKeySetIDs), groupKeySetIDs); + encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); return encoder.Finalize(); } @@ -10191,9 +9972,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kGroupKeySetIDs)) + if (__context_tag == to_underlying(Fields::kCommandResponseState)) { - err = DataModel::Decode(reader, groupKeySetIDs); + err = DataModel::Decode(reader, commandResponseState); } else { @@ -10202,7 +9983,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace KeySetReadAllIndicesResponse. +} // namespace OperationalCommandResponse. } // namespace Commands namespace Attributes { @@ -10210,14 +9991,18 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::GroupKeyMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, groupKeyMap); - case Attributes::GroupTable::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, groupTable); - case Attributes::MaxGroupsPerFabric::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxGroupsPerFabric); - case Attributes::MaxGroupKeysPerFabric::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxGroupKeysPerFabric); + case Attributes::PhaseList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, phaseList); + case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPhase); + case Attributes::CountdownTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, countdownTime); + case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalStateList); + case Attributes::OperationalState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalState); + case Attributes::OperationalError::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalError); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10236,144 +10021,182 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace GroupKeyManagement -namespace FixedLabel { -namespace Structs {} // namespace Structs - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +namespace Events { +namespace OperationalError { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) - { - case Attributes::LabelList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, labelList); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); + return aWriter.EndContainer(outer); } -} // namespace Attributes -namespace Events {} // namespace Events +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -} // namespace FixedLabel -namespace UserLabel { -namespace Structs {} // namespace Structs + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kErrorState)) + { + err = DataModel::Decode(reader, errorState); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::LabelList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, labelList); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace OperationalError. +namespace OperationCompletion { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); + return aWriter.EndContainer(outer); +} -namespace Events {} // namespace Events +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -} // namespace UserLabel -namespace ProxyConfiguration { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) + { + err = DataModel::Decode(reader, completionErrorCode); + } + else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + { + err = DataModel::Decode(reader, totalOperationalTime); + } + else if (__context_tag == to_underlying(Fields::kPausedTime)) + { + err = DataModel::Decode(reader, pausedTime); + } + else + { + } -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + ReturnErrorOnFailure(err); } } -} // namespace Attributes - -namespace Events {} // namespace Events +} // namespace OperationCompletion. +} // namespace Events -} // namespace ProxyConfiguration -namespace ProxyDiscovery { +} // namespace OvenCavityOperationalState +namespace OvenMode { +namespace Structs {} // namespace Structs -namespace Commands {} // namespace Commands +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewMode), newMode); + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNewMode)) + { + err = DataModel::Decode(reader, newMode); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Attributes +} // namespace ChangeToMode. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -namespace Events {} // namespace Events + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -} // namespace ProxyDiscovery -namespace ProxyValid { + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); + } + else + { + } -namespace Commands {} // namespace Commands + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeToModeResponse. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10394,8 +10217,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace ProxyValid -namespace BooleanState { +} // namespace OvenMode +namespace LaundryDryerControls { namespace Commands {} // namespace Commands @@ -10404,8 +10227,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::StateValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, stateValue); + case Attributes::SupportedDrynessLevels::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedDrynessLevels); + case Attributes::SelectedDrynessLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedDrynessLevel); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10424,14 +10249,19 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events { -namespace StateChange { +namespace Events {} // namespace Events + +} // namespace LaundryDryerControls +namespace ModeSelect { +namespace Structs { + +namespace SemanticTagStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStateValue), stateValue)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); + encoder.Encode(to_underlying(Fields::kValue), value); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -10448,9 +10278,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStateValue)) + if (__context_tag == to_underlying(Fields::kMfgCode)) { - err = DataModel::Decode(reader, stateValue); + err = DataModel::Decode(reader, mfgCode); + } + else if (__context_tag == to_underlying(Fields::kValue)) + { + err = DataModel::Decode(reader, value); } else { @@ -10459,43 +10293,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StateChange. -} // namespace Events - -} // namespace BooleanState -namespace IcdManagement { -namespace Structs { - -namespace MonitoringRegistrationStruct { -CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - return DoEncode(aWriter, aTag, NullOptional); -} -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const -{ - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} +} // namespace SemanticTagStruct -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +namespace ModeOptionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kMonitoredSubject), monitoredSubject); - } - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - + encoder.Encode(to_underlying(Fields::kLabel), label); + encoder.Encode(to_underlying(Fields::kMode), mode); + encoder.Encode(to_underlying(Fields::kSemanticTags), semanticTags); return encoder.Finalize(); } @@ -10513,17 +10320,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCheckInNodeID)) + if (__context_tag == to_underlying(Fields::kLabel)) { - err = DataModel::Decode(reader, checkInNodeID); + err = DataModel::Decode(reader, label); } - else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) + else if (__context_tag == to_underlying(Fields::kMode)) { - err = DataModel::Decode(reader, monitoredSubject); + err = DataModel::Decode(reader, mode); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + else if (__context_tag == to_underlying(Fields::kSemanticTags)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, semanticTags); } else { @@ -10533,18 +10340,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace MonitoringRegistrationStruct +} // namespace ModeOptionStruct } // namespace Structs namespace Commands { -namespace RegisterClient { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); - encoder.Encode(to_underlying(Fields::kMonitoredSubject), monitoredSubject); - encoder.Encode(to_underlying(Fields::kKey), key); - encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -10562,21 +10366,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCheckInNodeID)) - { - err = DataModel::Decode(reader, checkInNodeID); - } - else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) - { - err = DataModel::Decode(reader, monitoredSubject); - } - else if (__context_tag == to_underlying(Fields::kKey)) - { - err = DataModel::Decode(reader, key); - } - else if (__context_tag == to_underlying(Fields::kVerificationKey)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - err = DataModel::Decode(reader, verificationKey); + err = DataModel::Decode(reader, newMode); } else { @@ -10585,47 +10377,56 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RegisterClient. -namespace RegisterClientResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kICDCounter), ICDCounter); - return encoder.Finalize(); -} +} // namespace ChangeToMode. +} // namespace Commands -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + case Attributes::Description::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, description); + case Attributes::StandardNamespace::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, standardNamespace); + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); +namespace Events {} // namespace Events - if (__context_tag == to_underlying(Fields::kICDCounter)) - { - err = DataModel::Decode(reader, ICDCounter); - } - else - { - } +} // namespace ModeSelect +namespace LaundryWasherMode { +namespace Structs {} // namespace Structs - ReturnErrorOnFailure(err); - } -} -} // namespace RegisterClientResponse. -namespace UnregisterClient { +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); - encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -10643,13 +10444,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCheckInNodeID)) - { - err = DataModel::Decode(reader, checkInNodeID); - } - else if (__context_tag == to_underlying(Fields::kVerificationKey)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - err = DataModel::Decode(reader, verificationKey); + err = DataModel::Decode(reader, newMode); } else { @@ -10658,32 +10455,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UnregisterClient. -namespace StayActiveRequest { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace StayActiveRequest. -namespace StayActiveResponse { +} // namespace ChangeToMode. +namespace ChangeToModeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPromisedActiveDuration), promisedActiveDuration); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); return encoder.Finalize(); } @@ -10701,9 +10479,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPromisedActiveDuration)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, promisedActiveDuration); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); } else { @@ -10712,7 +10494,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StayActiveResponse. +} // namespace ChangeToModeResponse. } // namespace Commands namespace Attributes { @@ -10720,24 +10502,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::IdleModeDuration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, idleModeDuration); - case Attributes::ActiveModeDuration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeModeDuration); - case Attributes::ActiveModeThreshold::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeModeThreshold); - case Attributes::RegisteredClients::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, registeredClients); - case Attributes::ICDCounter::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, ICDCounter); - case Attributes::ClientsSupportedPerFabric::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clientsSupportedPerFabric); - case Attributes::UserActiveModeTriggerHint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, userActiveModeTriggerHint); - case Attributes::UserActiveModeTriggerInstruction::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, userActiveModeTriggerInstruction); - case Attributes::OperatingMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operatingMode); + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10756,13 +10528,19 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events { -namespace OnTransitionToActiveMode { +namespace Events {} // namespace Events + +} // namespace LaundryWasherMode +namespace RefrigeratorAndTemperatureControlledCabinetMode { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewMode), newMode); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -10775,20 +10553,28 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace OnTransitionToActiveMode. -} // namespace Events -} // namespace IcdManagement -namespace Timer { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands { -namespace SetTimer { + if (__context_tag == to_underlying(Fields::kNewMode)) + { + err = DataModel::Decode(reader, newMode); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeToMode. +namespace ChangeToModeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewTime), newTime); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); return encoder.Finalize(); } @@ -10806,9 +10592,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewTime)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, newTime); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); } else { @@ -10817,32 +10607,90 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTimer. -namespace ResetTimer { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); + switch (path.mAttributeId) + { + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } } +} // namespace Attributes -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +namespace Events {} // namespace Events + +} // namespace RefrigeratorAndTemperatureControlledCabinetMode +namespace LaundryWasherControls { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - detail::StructDecodeIterator __iterator(reader); - while (true) + switch (path.mAttributeId) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + case Attributes::SpinSpeeds::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, spinSpeeds); + case Attributes::SpinSpeedCurrent::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, spinSpeedCurrent); + case Attributes::NumberOfRinses::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfRinses); + case Attributes::SupportedRinses::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedRinses); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; } } -} // namespace ResetTimer. -namespace AddTime { +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace LaundryWasherControls +namespace RvcRunMode { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAdditionalTime), additionalTime); + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -10860,9 +10708,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAdditionalTime)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - err = DataModel::Decode(reader, additionalTime); + err = DataModel::Decode(reader, newMode); } else { @@ -10871,12 +10719,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddTime. -namespace ReduceTime { +} // namespace ChangeToMode. +namespace ChangeToModeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTimeReduction), timeReduction); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); return encoder.Finalize(); } @@ -10894,9 +10743,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTimeReduction)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, timeReduction); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); } else { @@ -10905,7 +10758,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ReduceTime. +} // namespace ChangeToModeResponse. } // namespace Commands namespace Attributes { @@ -10913,12 +10766,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::SetTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, setTime); - case Attributes::TimeRemaining::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timeRemaining); - case Attributes::TimerState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, timerState); + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10939,55 +10792,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace Timer -namespace OvenCavityOperationalState { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace Pause { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace Pause. -namespace Stop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace Stop. -namespace Start { +} // namespace RvcRunMode +namespace RvcCleanMode { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -11001,34 +10815,28 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace Start. -namespace Resume { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNewMode)) { - return std::get(__element); + err = DataModel::Decode(reader, newMode); } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Resume. -namespace OperationalCommandResponse { +} // namespace ChangeToMode. +namespace ChangeToModeResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); return encoder.Finalize(); } @@ -11046,9 +10854,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCommandResponseState)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, commandResponseState); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); } else { @@ -11057,7 +10869,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalCommandResponse. +} // namespace ChangeToModeResponse. } // namespace Commands namespace Attributes { @@ -11065,18 +10877,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::PhaseList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, phaseList); - case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPhase); - case Attributes::CountdownTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, countdownTime); - case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalStateList); - case Attributes::OperationalState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalState); - case Attributes::OperationalError::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalError); + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11095,14 +10901,19 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events { -namespace OperationalError { +namespace Events {} // namespace Events + +} // namespace RvcCleanMode +namespace TemperatureControl { + +namespace Commands { +namespace SetTemperature { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTargetTemperature), targetTemperature); + encoder.Encode(to_underlying(Fields::kTargetTemperatureLevel), targetTemperatureLevel); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11119,9 +10930,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kErrorState)) + if (__context_tag == to_underlying(Fields::kTargetTemperature)) { - err = DataModel::Decode(reader, errorState); + err = DataModel::Decode(reader, targetTemperature); + } + else if (__context_tag == to_underlying(Fields::kTargetTemperatureLevel)) + { + err = DataModel::Decode(reader, targetTemperatureLevel); } else { @@ -11130,15 +10945,90 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalError. -namespace OperationCompletion { +} // namespace SetTemperature. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::TemperatureSetpoint::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureSetpoint); + case Attributes::MinTemperature::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minTemperature); + case Attributes::MaxTemperature::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxTemperature); + case Attributes::Step::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, step); + case Attributes::SelectedTemperatureLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedTemperatureLevel); + case Attributes::SupportedTemperatureLevels::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedTemperatureLevels); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace TemperatureControl +namespace RefrigeratorAlarm { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Mask::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, mask); + case Attributes::State::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, state); + case Attributes::Supported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supported); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace Notify { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); return aWriter.EndContainer(outer); } @@ -11156,17 +11046,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) + if (__context_tag == to_underlying(Fields::kActive)) { - err = DataModel::Decode(reader, completionErrorCode); + err = DataModel::Decode(reader, active); } - else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + else if (__context_tag == to_underlying(Fields::kInactive)) { - err = DataModel::Decode(reader, totalOperationalTime); + err = DataModel::Decode(reader, inactive); } - else if (__context_tag == to_underlying(Fields::kPausedTime)) + else if (__context_tag == to_underlying(Fields::kState)) { - err = DataModel::Decode(reader, pausedTime); + err = DataModel::Decode(reader, state); + } + else if (__context_tag == to_underlying(Fields::kMask)) + { + err = DataModel::Decode(reader, mask); } else { @@ -11175,11 +11069,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationCompletion. +} // namespace Notify. } // namespace Events -} // namespace OvenCavityOperationalState -namespace OvenMode { +} // namespace RefrigeratorAlarm +namespace DishwasherMode { namespace Structs {} // namespace Structs namespace Commands { @@ -11287,24 +11181,99 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return CHIP_NO_ERROR; } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace OvenMode -namespace LaundryDryerControls { - -namespace Commands {} // namespace Commands +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace DishwasherMode +namespace AirQuality { + +namespace Commands {} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::AirQuality::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, airQuality); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace AirQuality +namespace SmokeCoAlarm { + +namespace Commands { +namespace SelfTestRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace SelfTestRequest. +} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { switch (path.mAttributeId) { - case Attributes::SupportedDrynessLevels::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedDrynessLevels); - case Attributes::SelectedDrynessLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, selectedDrynessLevel); + case Attributes::ExpressedState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, expressedState); + case Attributes::SmokeState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, smokeState); + case Attributes::COState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, COState); + case Attributes::BatteryAlert::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, batteryAlert); + case Attributes::DeviceMuted::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, deviceMuted); + case Attributes::TestInProgress::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, testInProgress); + case Attributes::HardwareFaultAlert::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, hardwareFaultAlert); + case Attributes::EndOfServiceAlert::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, endOfServiceAlert); + case Attributes::InterconnectSmokeAlarm::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, interconnectSmokeAlarm); + case Attributes::InterconnectCOAlarm::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, interconnectCOAlarm); + case Attributes::ContaminationState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, contaminationState); + case Attributes::SmokeSensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, smokeSensitivityLevel); + case Attributes::ExpiryDate::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, expiryDate); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11323,19 +11292,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace LaundryDryerControls -namespace ModeSelect { -namespace Structs { - -namespace SemanticTagStruct { +namespace Events { +namespace SmokeAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMfgCode), mfgCode); - encoder.Encode(to_underlying(Fields::kValue), value); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11352,13 +11316,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMfgCode)) - { - err = DataModel::Decode(reader, mfgCode); - } - else if (__context_tag == to_underlying(Fields::kValue)) + if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, value); + err = DataModel::Decode(reader, alarmSeverityLevel); } else { @@ -11367,17 +11327,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace SemanticTagStruct - -namespace ModeOptionStruct { +} // namespace SmokeAlarm. +namespace COAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLabel), label); - encoder.Encode(to_underlying(Fields::kMode), mode); - encoder.Encode(to_underlying(Fields::kSemanticTags), semanticTags); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11394,17 +11351,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLabel)) - { - err = DataModel::Decode(reader, label); - } - else if (__context_tag == to_underlying(Fields::kMode)) - { - err = DataModel::Decode(reader, mode); - } - else if (__context_tag == to_underlying(Fields::kSemanticTags)) + if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, semanticTags); + err = DataModel::Decode(reader, alarmSeverityLevel); } else { @@ -11413,17 +11362,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ModeOptionStruct -} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // namespace COAlarm. +namespace LowBattery { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11440,9 +11386,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewMode)) + if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, alarmSeverityLevel); } else { @@ -11451,57 +11397,119 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -} // namespace Commands +} // namespace LowBattery. +namespace HardwareFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::Description::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, description); - case Attributes::StandardNamespace::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, standardNamespace); - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes +} // namespace HardwareFault. +namespace EndOfService { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Events {} // namespace Events +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace EndOfService. +namespace SelfTestComplete { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -} // namespace ModeSelect -namespace LaundryWasherMode { -namespace Structs {} // namespace Structs +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace SelfTestComplete. +namespace AlarmMuted { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Commands { -namespace ChangeToMode { +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace AlarmMuted. +namespace MuteEnded { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace MuteEnded. +namespace InterconnectSmokeAlarm { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11518,9 +11526,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewMode)) + if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, alarmSeverityLevel); } else { @@ -11529,14 +11537,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace InterconnectSmokeAlarm. +namespace InterconnectCOAlarm { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11553,13 +11561,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kStatusText)) + if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, alarmSeverityLevel); } else { @@ -11568,52 +11572,39 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. -} // namespace Commands +} // namespace InterconnectCOAlarm. +namespace AllClear { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events +} // namespace AllClear. +} // namespace Events -} // namespace LaundryWasherMode -namespace RefrigeratorAndTemperatureControlledCabinetMode { -namespace Structs {} // namespace Structs +} // namespace SmokeCoAlarm +namespace DishwasherAlarm { namespace Commands { -namespace ChangeToMode { +namespace Reset { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); + encoder.Encode(to_underlying(Fields::kAlarms), alarms); return encoder.Finalize(); } @@ -11631,9 +11622,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewMode)) + if (__context_tag == to_underlying(Fields::kAlarms)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, alarms); } else { @@ -11642,13 +11633,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace Reset. +namespace ModifyEnabledAlarms { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); + encoder.Encode(to_underlying(Fields::kMask), mask); return encoder.Finalize(); } @@ -11666,13 +11656,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kStatusText)) + if (__context_tag == to_underlying(Fields::kMask)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, mask); } else { @@ -11681,7 +11667,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. +} // namespace ModifyEnabledAlarms. } // namespace Commands namespace Attributes { @@ -11689,52 +11675,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace LaundryWasherControls { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::SpinSpeeds::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, spinSpeeds); - case Attributes::SpinSpeedCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, spinSpeedCurrent); - case Attributes::NumberOfRinses::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfRinses); - case Attributes::SupportedRinses::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedRinses); + case Attributes::Mask::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, mask); + case Attributes::Latch::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, latch); + case Attributes::State::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, state); + case Attributes::Supported::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supported); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11753,19 +11701,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events - -} // namespace LaundryWasherControls -namespace RvcRunMode { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +namespace Events { +namespace Notify { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -11782,48 +11728,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewMode)) - { - err = DataModel::Decode(reader, newMode); - } - else + if (__context_tag == to_underlying(Fields::kActive)) { + err = DataModel::Decode(reader, active); } - - ReturnErrorOnFailure(err); - } -} -} // namespace ChangeToMode. -namespace ChangeToModeResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kInactive)) { - return std::get(__element); + err = DataModel::Decode(reader, inactive); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStatus)) + else if (__context_tag == to_underlying(Fields::kState)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, state); } - else if (__context_tag == to_underlying(Fields::kStatusText)) + else if (__context_tag == to_underlying(Fields::kMask)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, mask); } else { @@ -11832,8 +11751,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. -} // namespace Commands +} // namespace Notify. +} // namespace Events + +} // namespace DishwasherAlarm +namespace MicrowaveOvenMode { +namespace Structs {} // namespace Structs + +namespace Commands {} // namespace Commands namespace Attributes { CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) @@ -11844,8 +11769,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, supportedModes); case Attributes::CurrentMode::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, currentMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11866,16 +11789,17 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace RvcRunMode -namespace RvcCleanMode { -namespace Structs {} // namespace Structs +} // namespace MicrowaveOvenMode +namespace MicrowaveOvenControl { namespace Commands { -namespace ChangeToMode { +namespace SetCookingParameters { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); + encoder.Encode(to_underlying(Fields::kCookMode), cookMode); + encoder.Encode(to_underlying(Fields::kCookTime), cookTime); + encoder.Encode(to_underlying(Fields::kPowerSetting), powerSetting); return encoder.Finalize(); } @@ -11887,15 +11811,23 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) auto __element = __iterator.Next(); if (std::holds_alternative(__element)) { - return std::get(__element); + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kCookMode)) + { + err = DataModel::Decode(reader, cookMode); + } + else if (__context_tag == to_underlying(Fields::kCookTime)) + { + err = DataModel::Decode(reader, cookTime); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kNewMode)) + else if (__context_tag == to_underlying(Fields::kPowerSetting)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, powerSetting); } else { @@ -11904,13 +11836,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace SetCookingParameters. +namespace AddMoreTime { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); + encoder.Encode(to_underlying(Fields::kTimeToAdd), timeToAdd); return encoder.Finalize(); } @@ -11928,13 +11859,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kStatusText)) + if (__context_tag == to_underlying(Fields::kTimeToAdd)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, timeToAdd); } else { @@ -11943,7 +11870,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. +} // namespace AddMoreTime. } // namespace Commands namespace Attributes { @@ -11951,12 +11878,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); + case Attributes::CookTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, cookTime); + case Attributes::PowerSetting::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, powerSetting); + case Attributes::MinPower::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, minPower); + case Attributes::MaxPower::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPower); + case Attributes::PowerStep::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, powerStep); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11977,16 +11908,15 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace RvcCleanMode -namespace TemperatureControl { +} // namespace MicrowaveOvenControl +namespace OperationalState { +namespace Structs {} // namespace Structs namespace Commands { -namespace SetTemperature { +namespace Pause { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTargetTemperature), targetTemperature); - encoder.Encode(to_underlying(Fields::kTargetTemperatureLevel), targetTemperatureLevel); return encoder.Finalize(); } @@ -12000,110 +11930,75 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace Pause. +namespace Stop { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kTargetTemperature)) - { - err = DataModel::Decode(reader, targetTemperature); - } - else if (__context_tag == to_underlying(Fields::kTargetTemperatureLevel)) - { - err = DataModel::Decode(reader, targetTemperatureLevel); - } - else +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { + return std::get(__element); } - - ReturnErrorOnFailure(err); } } -} // namespace SetTemperature. -} // namespace Commands +} // namespace Stop. +namespace Start { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::TemperatureSetpoint::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, temperatureSetpoint); - case Attributes::MinTemperature::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minTemperature); - case Attributes::MaxTemperature::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxTemperature); - case Attributes::Step::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, step); - case Attributes::SelectedTemperatureLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, selectedTemperatureLevel); - case Attributes::SupportedTemperatureLevels::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedTemperatureLevels); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace TemperatureControl -namespace RefrigeratorAlarm { - -namespace Commands {} // namespace Commands +} // namespace Start. +namespace Resume { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::Mask::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, mask); - case Attributes::State::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, state); - case Attributes::Supported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supported); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events { -namespace Notify { +} // namespace Resume. +namespace OperationalCommandResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12120,21 +12015,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActive)) - { - err = DataModel::Decode(reader, active); - } - else if (__context_tag == to_underlying(Fields::kInactive)) - { - err = DataModel::Decode(reader, inactive); - } - else if (__context_tag == to_underlying(Fields::kState)) - { - err = DataModel::Decode(reader, state); - } - else if (__context_tag == to_underlying(Fields::kMask)) + if (__context_tag == to_underlying(Fields::kCommandResponseState)) { - err = DataModel::Decode(reader, mask); + err = DataModel::Decode(reader, commandResponseState); } else { @@ -12143,20 +12026,52 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Notify. -} // namespace Events +} // namespace OperationalCommandResponse. +} // namespace Commands -} // namespace RefrigeratorAlarm -namespace DishwasherMode { -namespace Structs {} // namespace Structs +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::PhaseList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, phaseList); + case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPhase); + case Attributes::CountdownTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, countdownTime); + case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalStateList); + case Attributes::OperationalState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalState); + case Attributes::OperationalError::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalError); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes -namespace Commands { -namespace ChangeToMode { +namespace Events { +namespace OperationalError { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewMode), newMode); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12173,9 +12088,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewMode)) + if (__context_tag == to_underlying(Fields::kErrorState)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, errorState); } else { @@ -12184,14 +12099,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace OperationalError. +namespace OperationCompletion { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12208,13 +12125,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kStatus)) + if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, completionErrorCode); } - else if (__context_tag == to_underlying(Fields::kStatusText)) + else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, totalOperationalTime); + } + else if (__context_tag == to_underlying(Fields::kPausedTime)) + { + err = DataModel::Decode(reader, pausedTime); } else { @@ -12223,79 +12144,35 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. -} // namespace Commands +} // namespace OperationCompletion. +} // namespace Events -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +} // namespace OperationalState +namespace RvcOperationalState { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace Pause { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - switch (path.mAttributeId) - { - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::StartUpMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, startUpMode); - case Attributes::OnMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, onMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace DishwasherMode -namespace AirQuality { - -namespace Commands {} // namespace Commands -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::AirQuality::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, airQuality); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace AirQuality -namespace SmokeCoAlarm { - -namespace Commands { -namespace SelfTestRequest { +} // namespace Pause. +namespace Stop { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -12314,66 +12191,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace SelfTestRequest. -} // namespace Commands +} // namespace Stop. +namespace Start { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - switch (path.mAttributeId) + detail::StructDecodeIterator __iterator(reader); + while (true) { - case Attributes::ExpressedState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, expressedState); - case Attributes::SmokeState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, smokeState); - case Attributes::COState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, COState); - case Attributes::BatteryAlert::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, batteryAlert); - case Attributes::DeviceMuted::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, deviceMuted); - case Attributes::TestInProgress::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, testInProgress); - case Attributes::HardwareFaultAlert::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, hardwareFaultAlert); - case Attributes::EndOfServiceAlert::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, endOfServiceAlert); - case Attributes::InterconnectSmokeAlarm::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, interconnectSmokeAlarm); - case Attributes::InterconnectCOAlarm::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, interconnectCOAlarm); - case Attributes::ContaminationState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, contaminationState); - case Attributes::SmokeSensitivityLevel::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, smokeSensitivityLevel); - case Attributes::ExpiryDate::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, expiryDate); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } } } -} // namespace Attributes - -namespace Events { -namespace SmokeAlarm { +} // namespace Start. +namespace Resume { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12386,29 +12229,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) - { - err = DataModel::Decode(reader, alarmSeverityLevel); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace SmokeAlarm. -namespace COAlarm { +} // namespace Resume. +namespace OperationalCommandResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12425,9 +12254,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kCommandResponseState)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, commandResponseState); } else { @@ -12436,13 +12265,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace COAlarm. -namespace LowBattery { +} // namespace OperationalCommandResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::PhaseList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, phaseList); + case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentPhase); + case Attributes::CountdownTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, countdownTime); + case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalStateList); + case Attributes::OperationalState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalState); + case Attributes::OperationalError::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, operationalError); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace OperationalError { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); return aWriter.EndContainer(outer); } @@ -12460,9 +12327,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kErrorState)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, errorState); } else { @@ -12471,12 +12338,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LowBattery. -namespace HardwareFault { +} // namespace OperationalError. +namespace OperationCompletion { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); return aWriter.EndContainer(outer); } @@ -12490,57 +12360,43 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace HardwareFault. -namespace EndOfService { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) { - return std::get(__element); + err = DataModel::Decode(reader, completionErrorCode); } - } -} -} // namespace EndOfService. -namespace SelfTestComplete { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + { + err = DataModel::Decode(reader, totalOperationalTime); + } + else if (__context_tag == to_underlying(Fields::kPausedTime)) + { + err = DataModel::Decode(reader, pausedTime); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace SelfTestComplete. -namespace AlarmMuted { +} // namespace OperationCompletion. +} // namespace Events + +} // namespace RvcOperationalState +namespace ScenesManagement { +namespace Structs { + +namespace AttributeValuePair { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kAttributeID), attributeID); + encoder.Encode(to_underlying(Fields::kAttributeValue), attributeValue); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12553,37 +12409,35 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace AlarmMuted. -namespace MuteEnded { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kAttributeID)) + { + err = DataModel::Decode(reader, attributeID); + } + else if (__context_tag == to_underlying(Fields::kAttributeValue)) + { + err = DataModel::Decode(reader, attributeValue); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace MuteEnded. -namespace InterconnectSmokeAlarm { + +} // namespace AttributeValuePair + +namespace ExtensionFieldSet { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kClusterID), clusterID); + encoder.Encode(to_underlying(Fields::kAttributeValueList), attributeValueList); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12600,9 +12454,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kClusterID)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, clusterID); + } + else if (__context_tag == to_underlying(Fields::kAttributeValueList)) + { + err = DataModel::Decode(reader, attributeValueList); } else { @@ -12611,14 +12469,46 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InterconnectSmokeAlarm. -namespace InterconnectCOAlarm { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + +} // namespace ExtensionFieldSet + +namespace SceneInfoStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - return aWriter.EndContainer(outer); + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +{ + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + encoder.Encode(to_underlying(Fields::kSceneCount), sceneCount); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentScene), currentScene); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentGroup), currentGroup); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kSceneValid), sceneValid); + } + encoder.Encode(to_underlying(Fields::kRemainingCapacity), remainingCapacity); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12635,9 +12525,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kSceneCount)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, sceneCount); + } + else if (__context_tag == to_underlying(Fields::kCurrentScene)) + { + err = DataModel::Decode(reader, currentScene); + } + else if (__context_tag == to_underlying(Fields::kCurrentGroup)) + { + err = DataModel::Decode(reader, currentGroup); + } + else if (__context_tag == to_underlying(Fields::kSceneValid)) + { + err = DataModel::Decode(reader, sceneValid); + } + else if (__context_tag == to_underlying(Fields::kRemainingCapacity)) + { + err = DataModel::Decode(reader, remainingCapacity); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -12646,13 +12556,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InterconnectCOAlarm. -namespace AllClear { + +} // namespace SceneInfoStruct +} // namespace Structs + +namespace Commands { +namespace AddScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kSceneName), sceneName); + encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12665,20 +12583,45 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kSceneName)) + { + err = DataModel::Decode(reader, sceneName); + } + else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + { + err = DataModel::Decode(reader, extensionFieldSets); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace AllClear. -} // namespace Events - -} // namespace SmokeCoAlarm -namespace DishwasherAlarm { - -namespace Commands { -namespace Reset { +} // namespace AddScene. +namespace AddSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAlarms), alarms); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12696,9 +12639,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kAlarms)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, alarms); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); } else { @@ -12707,12 +12658,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Reset. -namespace ModifyEnabledAlarms { +} // namespace AddSceneResponse. +namespace ViewScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kMask), mask); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12730,9 +12682,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kMask)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, mask); + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); } else { @@ -12741,51 +12697,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ModifyEnabledAlarms. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::Mask::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, mask); - case Attributes::Latch::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, latch); - case Attributes::State::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, state); - case Attributes::Supported::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supported); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace Notify { +} // namespace ViewScene. +namespace ViewSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kActive), active)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInactive), inactive)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kState), state)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kMask), mask)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kSceneName), sceneName); + encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12802,21 +12725,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kActive)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, active); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kInactive)) + else if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, inactive); + err = DataModel::Decode(reader, groupID); } - else if (__context_tag == to_underlying(Fields::kState)) + else if (__context_tag == to_underlying(Fields::kSceneID)) { - err = DataModel::Decode(reader, state); + err = DataModel::Decode(reader, sceneID); } - else if (__context_tag == to_underlying(Fields::kMask)) + else if (__context_tag == to_underlying(Fields::kTransitionTime)) { - err = DataModel::Decode(reader, mask); + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kSceneName)) + { + err = DataModel::Decode(reader, sceneName); + } + else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + { + err = DataModel::Decode(reader, extensionFieldSets); } else { @@ -12825,55 +12756,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Notify. -} // namespace Events - -} // namespace DishwasherAlarm -namespace MicrowaveOvenMode { -namespace Structs {} // namespace Structs - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::SupportedModes::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedModes); - case Attributes::CurrentMode::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentMode); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace MicrowaveOvenMode -namespace MicrowaveOvenControl { - -namespace Commands { -namespace SetCookingParameters { +} // namespace ViewSceneResponse. +namespace RemoveScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCookMode), cookMode); - encoder.Encode(to_underlying(Fields::kCookTime), cookTime); - encoder.Encode(to_underlying(Fields::kPowerSetting), powerSetting); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12891,17 +12780,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCookMode)) - { - err = DataModel::Decode(reader, cookMode); - } - else if (__context_tag == to_underlying(Fields::kCookTime)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, cookTime); + err = DataModel::Decode(reader, groupID); } - else if (__context_tag == to_underlying(Fields::kPowerSetting)) + else if (__context_tag == to_underlying(Fields::kSceneID)) { - err = DataModel::Decode(reader, powerSetting); + err = DataModel::Decode(reader, sceneID); } else { @@ -12910,12 +12795,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetCookingParameters. -namespace AddMoreTime { +} // namespace RemoveScene. +namespace RemoveSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTimeToAdd), timeToAdd); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12933,9 +12820,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kTimeToAdd)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, timeToAdd); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); } else { @@ -12944,53 +12839,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddMoreTime. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::CookTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, cookTime); - case Attributes::PowerSetting::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerSetting); - case Attributes::MinPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, minPower); - case Attributes::MaxPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxPower); - case Attributes::PowerStep::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerStep); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events {} // namespace Events - -} // namespace MicrowaveOvenControl -namespace OperationalState { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace Pause { +} // namespace RemoveSceneResponse. +namespace RemoveAllScenes { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); return encoder.Finalize(); } @@ -13002,15 +12856,30 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) auto __element = __iterator.Next(); if (std::holds_alternative(__element)) { - return std::get(__element); + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else + { } + + ReturnErrorOnFailure(err); } } -} // namespace Pause. -namespace Stop { +} // namespace RemoveAllScenes. +namespace RemoveAllScenesResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); return encoder.Finalize(); } @@ -13024,13 +12893,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Stop. -namespace Start { +} // namespace RemoveAllScenesResponse. +namespace StoreScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -13044,13 +12932,33 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Start. -namespace Resume { +} // namespace StoreScene. +namespace StoreSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -13064,14 +12972,37 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Resume. -namespace OperationalCommandResponse { +} // namespace StoreSceneResponse. +namespace RecallScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); return encoder.Finalize(); } @@ -13089,9 +13020,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCommandResponseState)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, commandResponseState); + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); } else { @@ -13100,52 +13039,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalCommandResponse. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::PhaseList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, phaseList); - case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPhase); - case Attributes::CountdownTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, countdownTime); - case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalStateList); - case Attributes::OperationalState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalState); - case Attributes::OperationalError::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalError); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace OperationalError { +} // namespace RecallScene. +namespace GetSceneMembership { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13162,9 +13062,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kErrorState)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, errorState); + err = DataModel::Decode(reader, groupID); } else { @@ -13173,16 +13073,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalError. -namespace OperationCompletion { +} // namespace GetSceneMembership. +namespace GetSceneMembershipResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kCapacity), capacity); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneList), sceneList); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13199,17 +13099,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, completionErrorCode); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + else if (__context_tag == to_underlying(Fields::kCapacity)) { - err = DataModel::Decode(reader, totalOperationalTime); + err = DataModel::Decode(reader, capacity); } - else if (__context_tag == to_underlying(Fields::kPausedTime)) + else if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, pausedTime); + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneList)) + { + err = DataModel::Decode(reader, sceneList); } else { @@ -13218,18 +13122,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationCompletion. -} // namespace Events - -} // namespace OperationalState -namespace RvcOperationalState { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace Pause { +} // namespace GetSceneMembershipResponse. +namespace EnhancedAddScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kSceneName), sceneName); + encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); return encoder.Finalize(); } @@ -13243,13 +13145,45 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kSceneName)) + { + err = DataModel::Decode(reader, sceneName); + } + else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + { + err = DataModel::Decode(reader, extensionFieldSets); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Pause. -namespace Stop { +} // namespace EnhancedAddScene. +namespace EnhancedAddSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -13261,15 +13195,38 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) auto __element = __iterator.Next(); if (std::holds_alternative(__element)) { - return std::get(__element); + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else + { } + + ReturnErrorOnFailure(err); } } -} // namespace Stop. -namespace Start { +} // namespace EnhancedAddSceneResponse. +namespace EnhancedViewScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -13283,34 +13240,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace Start. -namespace Resume { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else { - return std::get(__element); } + + ReturnErrorOnFailure(err); } } -} // namespace Resume. -namespace OperationalCommandResponse { +} // namespace EnhancedViewScene. +namespace EnhancedViewSceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kSceneName), sceneName); + encoder.Encode(to_underlying(Fields::kExtensionFieldSets), extensionFieldSets); return encoder.Finalize(); } @@ -13328,9 +13287,29 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCommandResponseState)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, commandResponseState); + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kGroupID)) + { + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kSceneName)) + { + err = DataModel::Decode(reader, sceneName); + } + else if (__context_tag == to_underlying(Fields::kExtensionFieldSets)) + { + err = DataModel::Decode(reader, extensionFieldSets); } else { @@ -13339,52 +13318,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalCommandResponse. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::PhaseList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, phaseList); - case Attributes::CurrentPhase::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentPhase); - case Attributes::CountdownTime::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, countdownTime); - case Attributes::OperationalStateList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalStateList); - case Attributes::OperationalState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalState); - case Attributes::OperationalError::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, operationalError); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - case Attributes::AttributeList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, attributeList); - case Attributes::FeatureMap::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, featureMap); - case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, clusterRevision); - default: - return CHIP_NO_ERROR; - } -} -} // namespace Attributes - -namespace Events { -namespace OperationalError { +} // namespace EnhancedViewSceneResponse. +namespace CopyScene { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kMode), mode); + encoder.Encode(to_underlying(Fields::kGroupIdentifierFrom), groupIdentifierFrom); + encoder.Encode(to_underlying(Fields::kSceneIdentifierFrom), sceneIdentifierFrom); + encoder.Encode(to_underlying(Fields::kGroupIdentifierTo), groupIdentifierTo); + encoder.Encode(to_underlying(Fields::kSceneIdentifierTo), sceneIdentifierTo); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13401,9 +13345,25 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kErrorState)) + if (__context_tag == to_underlying(Fields::kMode)) { - err = DataModel::Decode(reader, errorState); + err = DataModel::Decode(reader, mode); + } + else if (__context_tag == to_underlying(Fields::kGroupIdentifierFrom)) + { + err = DataModel::Decode(reader, groupIdentifierFrom); + } + else if (__context_tag == to_underlying(Fields::kSceneIdentifierFrom)) + { + err = DataModel::Decode(reader, sceneIdentifierFrom); + } + else if (__context_tag == to_underlying(Fields::kGroupIdentifierTo)) + { + err = DataModel::Decode(reader, groupIdentifierTo); + } + else if (__context_tag == to_underlying(Fields::kSceneIdentifierTo)) + { + err = DataModel::Decode(reader, sceneIdentifierTo); } else { @@ -13412,16 +13372,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationalError. -namespace OperationCompletion { +} // namespace CopyScene. +namespace CopySceneResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCompletionErrorCode), completionErrorCode)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalOperationalTime), totalOperationalTime)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPausedTime), pausedTime)); - return aWriter.EndContainer(outer); + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupIdentifierFrom), groupIdentifierFrom); + encoder.Encode(to_underlying(Fields::kSceneIdentifierFrom), sceneIdentifierFrom); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13438,17 +13397,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, completionErrorCode); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + else if (__context_tag == to_underlying(Fields::kGroupIdentifierFrom)) { - err = DataModel::Decode(reader, totalOperationalTime); + err = DataModel::Decode(reader, groupIdentifierFrom); } - else if (__context_tag == to_underlying(Fields::kPausedTime)) + else if (__context_tag == to_underlying(Fields::kSceneIdentifierFrom)) { - err = DataModel::Decode(reader, pausedTime); + err = DataModel::Decode(reader, sceneIdentifierFrom); } else { @@ -13457,10 +13416,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationCompletion. -} // namespace Events +} // namespace CopySceneResponse. +} // namespace Commands -} // namespace RvcOperationalState +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SceneCount::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sceneCount); + case Attributes::CurrentScene::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentScene); + case Attributes::CurrentGroup::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentGroup); + case Attributes::SceneValid::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sceneValid); + case Attributes::NameSupport::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, nameSupport); + case Attributes::LastConfiguredBy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, lastConfiguredBy); + case Attributes::SceneTableSize::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sceneTableSize); + case Attributes::FabricSceneInfo::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fabricSceneInfo); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace ScenesManagement namespace HepaFilterMonitoring { namespace Structs { @@ -28992,33 +28992,6 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::Scenes::Id: { - switch (aCommand) - { - case Clusters::Scenes::Commands::AddScene::Id: - return true; - case Clusters::Scenes::Commands::ViewScene::Id: - return true; - case Clusters::Scenes::Commands::RemoveScene::Id: - return true; - case Clusters::Scenes::Commands::RemoveAllScenes::Id: - return true; - case Clusters::Scenes::Commands::StoreScene::Id: - return true; - case Clusters::Scenes::Commands::RecallScene::Id: - return true; - case Clusters::Scenes::Commands::GetSceneMembership::Id: - return true; - case Clusters::Scenes::Commands::EnhancedAddScene::Id: - return true; - case Clusters::Scenes::Commands::EnhancedViewScene::Id: - return true; - case Clusters::Scenes::Commands::CopyScene::Id: - return true; - default: - return false; - } - } case Clusters::OnOff::Id: { switch (aCommand) { @@ -29277,6 +29250,33 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::ScenesManagement::Id: { + switch (aCommand) + { + case Clusters::ScenesManagement::Commands::AddScene::Id: + return true; + case Clusters::ScenesManagement::Commands::ViewScene::Id: + return true; + case Clusters::ScenesManagement::Commands::RemoveScene::Id: + return true; + case Clusters::ScenesManagement::Commands::RemoveAllScenes::Id: + return true; + case Clusters::ScenesManagement::Commands::StoreScene::Id: + return true; + case Clusters::ScenesManagement::Commands::RecallScene::Id: + return true; + case Clusters::ScenesManagement::Commands::GetSceneMembership::Id: + return true; + case Clusters::ScenesManagement::Commands::EnhancedAddScene::Id: + return true; + case Clusters::ScenesManagement::Commands::EnhancedViewScene::Id: + return true; + case Clusters::ScenesManagement::Commands::CopyScene::Id: + return true; + default: + return false; + } + } case Clusters::HepaFilterMonitoring::Id: { switch (aCommand) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 86b8334de7f2c2..086127558a642b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -911,229 +911,59 @@ struct TypeInfo }; } // namespace Attributes } // namespace Groups -namespace Scenes { -namespace Structs { -namespace AttributeValuePair { -enum class Fields : uint8_t -{ - kAttributeID = 0, - kAttributeValue = 1, -}; - -struct Type -{ -public: - chip::AttributeId attributeID = static_cast(0); - uint32_t attributeValue = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace AttributeValuePair -namespace ExtensionFieldSet { -enum class Fields : uint8_t -{ - kClusterID = 0, - kAttributeValueList = 1, -}; - -struct Type -{ -public: - chip::ClusterId clusterID = static_cast(0); - DataModel::List attributeValueList; - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - chip::ClusterId clusterID = static_cast(0); - DataModel::DecodableList attributeValueList; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; -}; - -} // namespace ExtensionFieldSet -namespace SceneInfoStruct { -enum class Fields : uint8_t -{ - kSceneCount = 0, - kCurrentScene = 1, - kCurrentGroup = 2, - kSceneValid = 3, - kRemainingCapacity = 4, - kFabricIndex = 254, -}; - -struct Type -{ -public: - uint8_t sceneCount = static_cast(0); - uint8_t currentScene = static_cast(0); - chip::GroupId currentGroup = static_cast(0); - bool sceneValid = static_cast(0); - uint8_t remainingCapacity = static_cast(0); - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = true; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } - - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; - -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; -}; - -using DecodableType = Type; - -} // namespace SceneInfoStruct -} // namespace Structs +namespace OnOff { namespace Commands { // Forward-declarations so we can reference these later. -namespace AddScene { -struct Type; -struct DecodableType; -} // namespace AddScene - -namespace AddSceneResponse { -struct Type; -struct DecodableType; -} // namespace AddSceneResponse - -namespace ViewScene { -struct Type; -struct DecodableType; -} // namespace ViewScene - -namespace ViewSceneResponse { -struct Type; -struct DecodableType; -} // namespace ViewSceneResponse - -namespace RemoveScene { -struct Type; -struct DecodableType; -} // namespace RemoveScene - -namespace RemoveSceneResponse { -struct Type; -struct DecodableType; -} // namespace RemoveSceneResponse - -namespace RemoveAllScenes { -struct Type; -struct DecodableType; -} // namespace RemoveAllScenes - -namespace RemoveAllScenesResponse { -struct Type; -struct DecodableType; -} // namespace RemoveAllScenesResponse - -namespace StoreScene { -struct Type; -struct DecodableType; -} // namespace StoreScene - -namespace StoreSceneResponse { -struct Type; -struct DecodableType; -} // namespace StoreSceneResponse - -namespace RecallScene { -struct Type; -struct DecodableType; -} // namespace RecallScene - -namespace GetSceneMembership { -struct Type; -struct DecodableType; -} // namespace GetSceneMembership - -namespace GetSceneMembershipResponse { -struct Type; -struct DecodableType; -} // namespace GetSceneMembershipResponse - -namespace EnhancedAddScene { +namespace Off { struct Type; struct DecodableType; -} // namespace EnhancedAddScene +} // namespace Off -namespace EnhancedAddSceneResponse { +namespace On { struct Type; struct DecodableType; -} // namespace EnhancedAddSceneResponse +} // namespace On -namespace EnhancedViewScene { +namespace Toggle { struct Type; struct DecodableType; -} // namespace EnhancedViewScene +} // namespace Toggle -namespace EnhancedViewSceneResponse { +namespace OffWithEffect { struct Type; struct DecodableType; -} // namespace EnhancedViewSceneResponse +} // namespace OffWithEffect -namespace CopyScene { +namespace OnWithRecallGlobalScene { struct Type; struct DecodableType; -} // namespace CopyScene +} // namespace OnWithRecallGlobalScene -namespace CopySceneResponse { +namespace OnWithTimedOff { struct Type; struct DecodableType; -} // namespace CopySceneResponse +} // namespace OnWithTimedOff } // namespace Commands namespace Commands { -namespace AddScene { +namespace Off { enum class Fields : uint8_t { - kGroupID = 0, - kSceneID = 1, - kTransitionTime = 2, - kSceneName = 3, - kExtensionFieldSets = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - uint16_t transitionTime = static_cast(0); - chip::CharSpan sceneName; - DataModel::List extensionFieldSets; + static constexpr CommandId GetCommandId() { return Commands::Off::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::AddSceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1141,35 +971,23 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Off::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - uint16_t transitionTime = static_cast(0); - chip::CharSpan sceneName; - DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddScene -namespace AddSceneResponse { +}; // namespace Off +namespace On { enum class Fields : uint8_t { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::On::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1181,35 +999,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::On::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddSceneResponse -namespace ViewScene { +}; // namespace On +namespace Toggle { enum class Fields : uint8_t { - kGroupID = 0, - kSceneID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::ViewSceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1217,38 +1027,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ViewScene -namespace ViewSceneResponse { +}; // namespace Toggle +namespace OffWithEffect { enum class Fields : uint8_t { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, - kTransitionTime = 3, - kSceneName = 4, - kExtensionFieldSets = 5, + kEffectIdentifier = 0, + kEffectVariant = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional transitionTime; - Optional sceneName; - Optional> extensionFieldSets; + EffectIdentifierEnum effectIdentifier = static_cast(0); + uint8_t effectVariant = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1260,38 +1060,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional transitionTime; - Optional sceneName; - Optional> extensionFieldSets; + EffectIdentifierEnum effectIdentifier = static_cast(0); + uint8_t effectVariant = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ViewSceneResponse -namespace RemoveScene { +}; // namespace OffWithEffect +namespace OnWithRecallGlobalScene { enum class Fields : uint8_t { - kGroupID = 0, - kSceneID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1299,32 +1090,30 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RemoveScene -namespace RemoveSceneResponse { +}; // namespace OnWithRecallGlobalScene +namespace OnWithTimedOff { enum class Fields : uint8_t { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, + kOnOffControl = 0, + kOnTime = 1, + kOffWaitTime = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + chip::BitMask onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1336,211 +1125,301 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + chip::BitMask onOffControl = static_cast>(0); + uint16_t onTime = static_cast(0); + uint16_t offWaitTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RemoveSceneResponse -namespace RemoveAllScenes { -enum class Fields : uint8_t -{ - kGroupID = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType; +}; // namespace OnWithTimedOff +} // namespace Commands - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace Attributes { -struct DecodableType +namespace OnOff { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - chip::GroupId groupID = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnOff::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace RemoveAllScenes -namespace RemoveAllScenesResponse { -enum class Fields : uint8_t +} // namespace OnOff +namespace GlobalSceneControl { +struct TypeInfo { - kStatus = 0, - kGroupID = 1, -}; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::GlobalSceneControl::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace GlobalSceneControl +namespace OnTime { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace OnTime +namespace OffWaitTime { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OffWaitTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace RemoveAllScenesResponse -namespace StoreScene { -enum class Fields : uint8_t +} // namespace OffWaitTime +namespace StartUpOnOff { +struct TypeInfo { - kGroupID = 0, - kSceneID = 1, -}; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpOnOff::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpOnOff +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::Scenes::Commands::StoreSceneResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; -}; // namespace StoreScene -namespace StoreSceneResponse { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; -}; // namespace StoreSceneResponse -namespace RecallScene { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kGroupID = 0, - kSceneID = 1, - kTransitionTime = 2, + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional> transitionTime; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::OnOff::TypeInfo::DecodableType onOff = static_cast(0); + Attributes::GlobalSceneControl::TypeInfo::DecodableType globalSceneControl = static_cast(0); + Attributes::OnTime::TypeInfo::DecodableType onTime = static_cast(0); + Attributes::OffWaitTime::TypeInfo::DecodableType offWaitTime = static_cast(0); + Attributes::StartUpOnOff::TypeInfo::DecodableType startUpOnOff; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace OnOff +namespace OnOffSwitchConfiguration { - using ResponseType = DataModel::NullObjectType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace SwitchType { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SwitchType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace SwitchType +namespace SwitchActions { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SwitchActions::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SwitchActions +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } +}; +} // namespace ClusterRevision - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional> transitionTime; - CHIP_ERROR Decode(TLV::TLVReader & reader); +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SwitchType::TypeInfo::DecodableType switchType = static_cast(0); + Attributes::SwitchActions::TypeInfo::DecodableType switchActions = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace RecallScene -namespace GetSceneMembership { +} // namespace Attributes +} // namespace OnOffSwitchConfiguration +namespace LevelControl { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace MoveToLevel { +struct Type; +struct DecodableType; +} // namespace MoveToLevel + +namespace Move { +struct Type; +struct DecodableType; +} // namespace Move + +namespace Step { +struct Type; +struct DecodableType; +} // namespace Step + +namespace Stop { +struct Type; +struct DecodableType; +} // namespace Stop + +namespace MoveToLevelWithOnOff { +struct Type; +struct DecodableType; +} // namespace MoveToLevelWithOnOff + +namespace MoveWithOnOff { +struct Type; +struct DecodableType; +} // namespace MoveWithOnOff + +namespace StepWithOnOff { +struct Type; +struct DecodableType; +} // namespace StepWithOnOff + +namespace StopWithOnOff { +struct Type; +struct DecodableType; +} // namespace StopWithOnOff + +namespace MoveToClosestFrequency { +struct Type; +struct DecodableType; +} // namespace MoveToClosestFrequency + +} // namespace Commands + +namespace Commands { +namespace MoveToLevel { enum class Fields : uint8_t { - kGroupID = 0, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); + uint8_t level = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1548,33 +1427,36 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); + uint8_t level = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetSceneMembership -namespace GetSceneMembershipResponse { +}; // namespace MoveToLevel +namespace Move { enum class Fields : uint8_t { - kStatus = 0, - kCapacity = 1, - kGroupID = 2, - kSceneList = 3, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Move::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - DataModel::Nullable capacity; - chip::GroupId groupID = static_cast(0); - Optional> sceneList; + MoveModeEnum moveMode = static_cast(0); + DataModel::Nullable rate; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1586,42 +1468,42 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Move::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - DataModel::Nullable capacity; - chip::GroupId groupID = static_cast(0); - Optional> sceneList; + MoveModeEnum moveMode = static_cast(0); + DataModel::Nullable rate; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetSceneMembershipResponse -namespace EnhancedAddScene { +}; // namespace Move +namespace Step { enum class Fields : uint8_t { - kGroupID = 0, - kSceneID = 1, - kTransitionTime = 2, - kSceneName = 3, - kExtensionFieldSets = 4, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Step::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - uint16_t transitionTime = static_cast(0); - chip::CharSpan sceneName; - DataModel::List extensionFieldSets; + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1629,35 +1511,33 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Step::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - uint16_t transitionTime = static_cast(0); - chip::CharSpan sceneName; - DataModel::DecodableList extensionFieldSets; + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace EnhancedAddScene -namespace EnhancedAddSceneResponse { +}; // namespace Step +namespace Stop { enum class Fields : uint8_t { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1669,35 +1549,38 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace EnhancedAddSceneResponse -namespace EnhancedViewScene { +}; // namespace Stop +namespace MoveToLevelWithOnOff { enum class Fields : uint8_t { - kGroupID = 0, - kSceneID = 1, + kLevel = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + uint8_t level = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1705,38 +1588,36 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); + uint8_t level = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace EnhancedViewScene -namespace EnhancedViewSceneResponse { +}; // namespace MoveToLevelWithOnOff +namespace MoveWithOnOff { enum class Fields : uint8_t { - kStatus = 0, - kGroupID = 1, - kSceneID = 2, - kTransitionTime = 3, - kSceneName = 4, - kExtensionFieldSets = 5, + kMoveMode = 0, + kRate = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional transitionTime; - Optional sceneName; - Optional> extensionFieldSets; + MoveModeEnum moveMode = static_cast(0); + DataModel::Nullable rate; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1748,44 +1629,42 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupID = static_cast(0); - uint8_t sceneID = static_cast(0); - Optional transitionTime; - Optional sceneName; - Optional> extensionFieldSets; + MoveModeEnum moveMode = static_cast(0); + DataModel::Nullable rate; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace EnhancedViewSceneResponse -namespace CopyScene { +}; // namespace MoveWithOnOff +namespace StepWithOnOff { enum class Fields : uint8_t { - kMode = 0, - kGroupIdentifierFrom = 1, - kSceneIdentifierFrom = 2, - kGroupIdentifierTo = 3, - kSceneIdentifierTo = 4, + kStepMode = 0, + kStepSize = 1, + kTransitionTime = 2, + kOptionsMask = 3, + kOptionsOverride = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask mode = static_cast>(0); - chip::GroupId groupIdentifierFrom = static_cast(0); - uint8_t sceneIdentifierFrom = static_cast(0); - chip::GroupId groupIdentifierTo = static_cast(0); - uint8_t sceneIdentifierTo = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Scenes::Commands::CopySceneResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -1793,35 +1672,33 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - chip::BitMask mode = static_cast>(0); - chip::GroupId groupIdentifierFrom = static_cast(0); - uint8_t sceneIdentifierFrom = static_cast(0); - chip::GroupId groupIdentifierTo = static_cast(0); - uint8_t sceneIdentifierTo = static_cast(0); + StepModeEnum stepMode = static_cast(0); + uint8_t stepSize = static_cast(0); + DataModel::Nullable transitionTime; + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CopyScene -namespace CopySceneResponse { +}; // namespace StepWithOnOff +namespace StopWithOnOff { enum class Fields : uint8_t { - kStatus = 0, - kGroupIdentifierFrom = 1, - kSceneIdentifierFrom = 2, + kOptionsMask = 0, + kOptionsOverride = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupIdentifierFrom = static_cast(0); - uint8_t sceneIdentifierFrom = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -1833,150 +1710,252 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupIdentifierFrom = static_cast(0); - uint8_t sceneIdentifierFrom = static_cast(0); + chip::BitMask optionsMask = static_cast>(0); + chip::BitMask optionsOverride = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CopySceneResponse +}; // namespace StopWithOnOff +namespace MoveToClosestFrequency { +enum class Fields : uint8_t +{ + kFrequency = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::MoveToClosestFrequency::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + + uint16_t frequency = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::MoveToClosestFrequency::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + + uint16_t frequency = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace MoveToClosestFrequency } // namespace Commands namespace Attributes { -namespace SceneCount { +namespace CurrentLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentLevel +namespace RemainingTime { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemainingTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace RemainingTime +namespace MinLevel { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SceneCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SceneCount -namespace CurrentScene { +} // namespace MinLevel +namespace MaxLevel { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentScene -namespace CurrentGroup { +} // namespace MaxLevel +namespace CurrentFrequency { struct TypeInfo { - using Type = chip::GroupId; - using DecodableType = chip::GroupId; - using DecodableArgType = chip::GroupId; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentGroup::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFrequency::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentGroup -namespace SceneValid { +} // namespace CurrentFrequency +namespace MinFrequency { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SceneValid::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinFrequency::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SceneValid -namespace NameSupport { +} // namespace MinFrequency +namespace MaxFrequency { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NameSupport::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxFrequency::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NameSupport -namespace LastConfiguredBy { +} // namespace MaxFrequency +namespace Options { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LastConfiguredBy::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LastConfiguredBy -namespace SceneTableSize { +} // namespace Options +namespace OnOffTransitionTime { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SceneTableSize::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnOffTransitionTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SceneTableSize -namespace FabricSceneInfo { +} // namespace OnOffTransitionTime +namespace OnLevel { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::FabricSceneInfo::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FabricSceneInfo +} // namespace OnLevel +namespace OnTransitionTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnTransitionTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnTransitionTime +namespace OffTransitionTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OffTransitionTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OffTransitionTime +namespace DefaultMoveRate { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultMoveRate::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DefaultMoveRate +namespace StartUpCurrentLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpCurrentLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpCurrentLevel namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } }; } // namespace ClusterRevision @@ -1984,19 +1963,25 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SceneCount::TypeInfo::DecodableType sceneCount = static_cast(0); - Attributes::CurrentScene::TypeInfo::DecodableType currentScene = static_cast(0); - Attributes::CurrentGroup::TypeInfo::DecodableType currentGroup = static_cast(0); - Attributes::SceneValid::TypeInfo::DecodableType sceneValid = static_cast(0); - Attributes::NameSupport::TypeInfo::DecodableType nameSupport = - static_cast>(0); - Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy; - Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); - Attributes::FabricSceneInfo::TypeInfo::DecodableType fabricSceneInfo; + Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel; + Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); + Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); + Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); + Attributes::CurrentFrequency::TypeInfo::DecodableType currentFrequency = static_cast(0); + Attributes::MinFrequency::TypeInfo::DecodableType minFrequency = static_cast(0); + Attributes::MaxFrequency::TypeInfo::DecodableType maxFrequency = static_cast(0); + Attributes::Options::TypeInfo::DecodableType options = + static_cast>(0); + Attributes::OnOffTransitionTime::TypeInfo::DecodableType onOffTransitionTime = static_cast(0); + Attributes::OnLevel::TypeInfo::DecodableType onLevel; + Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; + Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; + Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -2006,328 +1991,156 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Scenes -namespace OnOff { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Off { -struct Type; -struct DecodableType; -} // namespace Off - -namespace On { -struct Type; -struct DecodableType; -} // namespace On - -namespace Toggle { -struct Type; -struct DecodableType; -} // namespace Toggle - -namespace OffWithEffect { -struct Type; -struct DecodableType; -} // namespace OffWithEffect - -namespace OnWithRecallGlobalScene { -struct Type; -struct DecodableType; -} // namespace OnWithRecallGlobalScene - -namespace OnWithTimedOff { -struct Type; -struct DecodableType; -} // namespace OnWithTimedOff +} // namespace LevelControl +namespace BinaryInputBasic { -} // namespace Commands +namespace Attributes { -namespace Commands { -namespace Off { -enum class Fields : uint8_t +namespace ActiveText { +struct TypeInfo { -}; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveText::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace ActiveText +namespace Description { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Off::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } }; - -struct DecodableType +} // namespace Description +namespace InactiveText { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::Off::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InactiveText::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } }; -}; // namespace Off -namespace On { -enum class Fields : uint8_t +} // namespace InactiveText +namespace OutOfService { +struct TypeInfo { -}; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OutOfService::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OutOfService +namespace Polarity { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::On::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Polarity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::On::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace On -namespace Toggle { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Toggle::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Toggle -namespace OffWithEffect { -enum class Fields : uint8_t -{ - kEffectIdentifier = 0, - kEffectVariant = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - EffectIdentifierEnum effectIdentifier = static_cast(0); - uint8_t effectVariant = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::OffWithEffect::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - EffectIdentifierEnum effectIdentifier = static_cast(0); - uint8_t effectVariant = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace OffWithEffect -namespace OnWithRecallGlobalScene { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::OnWithRecallGlobalScene::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace OnWithRecallGlobalScene -namespace OnWithTimedOff { -enum class Fields : uint8_t -{ - kOnOffControl = 0, - kOnTime = 1, - kOffWaitTime = 2, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - chip::BitMask onOffControl = static_cast>(0); - uint16_t onTime = static_cast(0); - uint16_t offWaitTime = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::OnWithTimedOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - - chip::BitMask onOffControl = static_cast>(0); - uint16_t onTime = static_cast(0); - uint16_t offWaitTime = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace OnWithTimedOff -} // namespace Commands - -namespace Attributes { - -namespace OnOff { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnOff::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnOff -namespace GlobalSceneControl { +} // namespace Polarity +namespace PresentValue { struct TypeInfo { using Type = bool; using DecodableType = bool; using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::GlobalSceneControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PresentValue::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GlobalSceneControl -namespace OnTime { +} // namespace PresentValue +namespace Reliability { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Reliability::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OnTime -namespace OffWaitTime { +} // namespace Reliability +namespace StatusFlags { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OffWaitTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StatusFlags::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OffWaitTime -namespace StartUpOnOff { +} // namespace StatusFlags +namespace ApplicationType { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpOnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationType::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StartUpOnOff +} // namespace ApplicationType namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } }; } // namespace ClusterRevision @@ -2335,15 +2148,19 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OnOff::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::OnOff::TypeInfo::DecodableType onOff = static_cast(0); - Attributes::GlobalSceneControl::TypeInfo::DecodableType globalSceneControl = static_cast(0); - Attributes::OnTime::TypeInfo::DecodableType onTime = static_cast(0); - Attributes::OffWaitTime::TypeInfo::DecodableType offWaitTime = static_cast(0); - Attributes::StartUpOnOff::TypeInfo::DecodableType startUpOnOff; + Attributes::ActiveText::TypeInfo::DecodableType activeText; + Attributes::Description::TypeInfo::DecodableType description; + Attributes::InactiveText::TypeInfo::DecodableType inactiveText; + Attributes::OutOfService::TypeInfo::DecodableType outOfService = static_cast(0); + Attributes::Polarity::TypeInfo::DecodableType polarity = static_cast(0); + Attributes::PresentValue::TypeInfo::DecodableType presentValue = static_cast(0); + Attributes::Reliability::TypeInfo::DecodableType reliability = static_cast(0); + Attributes::StatusFlags::TypeInfo::DecodableType statusFlags = static_cast(0); + Attributes::ApplicationType::TypeInfo::DecodableType applicationType = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -2353,69 +2170,45 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OnOff -namespace OnOffSwitchConfiguration { +} // namespace BinaryInputBasic +namespace PulseWidthModulation { namespace Attributes { -namespace SwitchType { -struct TypeInfo +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SwitchType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; -} // namespace SwitchType -namespace SwitchActions { -struct TypeInfo +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SwitchActions::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SwitchActions -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } }; } // namespace ClusterRevision @@ -2423,12 +2216,10 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SwitchType::TypeInfo::DecodableType switchType = static_cast(0); - Attributes::SwitchActions::TypeInfo::DecodableType switchActions = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -2438,620 +2229,510 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OnOffSwitchConfiguration -namespace LevelControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace MoveToLevel { -struct Type; -struct DecodableType; -} // namespace MoveToLevel - -namespace Move { -struct Type; -struct DecodableType; -} // namespace Move - -namespace Step { -struct Type; -struct DecodableType; -} // namespace Step - -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop - -namespace MoveToLevelWithOnOff { -struct Type; -struct DecodableType; -} // namespace MoveToLevelWithOnOff - -namespace MoveWithOnOff { -struct Type; -struct DecodableType; -} // namespace MoveWithOnOff - -namespace StepWithOnOff { -struct Type; -struct DecodableType; -} // namespace StepWithOnOff - -namespace StopWithOnOff { -struct Type; -struct DecodableType; -} // namespace StopWithOnOff - -namespace MoveToClosestFrequency { -struct Type; -struct DecodableType; -} // namespace MoveToClosestFrequency - -} // namespace Commands - -namespace Commands { -namespace MoveToLevel { +} // namespace PulseWidthModulation +namespace Descriptor { +namespace Structs { +namespace DeviceTypeStruct { enum class Fields : uint8_t { - kLevel = 0, - kTransitionTime = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + kDeviceType = 0, + kRevision = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - uint8_t level = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + chip::DeviceTypeId deviceType = static_cast(0); + uint16_t revision = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = DataModel::NullObjectType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } +using DecodableType = Type; - uint8_t level = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace MoveToLevel -namespace Move { +} // namespace DeviceTypeStruct +namespace SemanticTagStruct { enum class Fields : uint8_t { - kMoveMode = 0, - kRate = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + kMfgCode = 0, + kNamespaceID = 1, + kTag = 2, + kLabel = 3, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Move::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + DataModel::Nullable mfgCode; + uint8_t namespaceID = static_cast(0); + uint8_t tag = static_cast(0); + Optional> label; - MoveModeEnum moveMode = static_cast(0); - DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - using ResponseType = DataModel::NullObjectType; +using DecodableType = Type; - static constexpr bool MustUseTimedInvoke() { return false; } -}; +} // namespace SemanticTagStruct +} // namespace Structs -struct DecodableType +namespace Attributes { + +namespace DeviceTypeList { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::Move::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - MoveModeEnum moveMode = static_cast(0); - DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DeviceTypeList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace Move -namespace Step { -enum class Fields : uint8_t +} // namespace DeviceTypeList +namespace ServerList { +struct TypeInfo { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, -}; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ServerList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ServerList +namespace ClientList { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Step::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - StepModeEnum stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ClientList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace ClientList +namespace PartsList { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::Step::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - StepModeEnum stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PartsList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace Step -namespace Stop { -enum class Fields : uint8_t +} // namespace PartsList +namespace TagList { +struct TypeInfo { - kOptionsMask = 0, - kOptionsOverride = 1, -}; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TagList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace TagList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; -}; // namespace Stop -namespace MoveToLevelWithOnOff { -enum class Fields : uint8_t +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - kLevel = 0, - kTransitionTime = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; - -struct Type +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - uint8_t level = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; - -struct DecodableType +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - uint8_t level = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; -}; // namespace MoveToLevelWithOnOff -namespace MoveWithOnOff { -enum class Fields : uint8_t +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - kMoveMode = 0, - kRate = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; - -struct Type +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - MoveModeEnum moveMode = static_cast(0); - DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - MoveModeEnum moveMode = static_cast(0); - DataModel::Nullable rate; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::DeviceTypeList::TypeInfo::DecodableType deviceTypeList; + Attributes::ServerList::TypeInfo::DecodableType serverList; + Attributes::ClientList::TypeInfo::DecodableType clientList; + Attributes::PartsList::TypeInfo::DecodableType partsList; + Attributes::TagList::TypeInfo::DecodableType tagList; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace MoveWithOnOff -namespace StepWithOnOff { +} // namespace Attributes +} // namespace Descriptor +namespace Binding { +namespace Structs { +namespace TargetStruct { enum class Fields : uint8_t { - kStepMode = 0, - kStepSize = 1, - kTransitionTime = 2, - kOptionsMask = 3, - kOptionsOverride = 4, + kNode = 1, + kGroup = 2, + kEndpoint = 3, + kCluster = 4, + kFabricIndex = 254, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + Optional node; + Optional group; + Optional endpoint; + Optional cluster; + chip::FabricIndex fabricIndex = static_cast(0); - StepModeEnum stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr bool kIsFabricScoped = true; - using ResponseType = DataModel::NullObjectType; + auto GetFabricIndex() const { return fabricIndex; } - static constexpr bool MustUseTimedInvoke() { return false; } -}; + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; - StepModeEnum stepMode = static_cast(0); - uint8_t stepSize = static_cast(0); - DataModel::Nullable transitionTime; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StepWithOnOff -namespace StopWithOnOff { -enum class Fields : uint8_t -{ - kOptionsMask = 0, - kOptionsOverride = 1, +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } +using DecodableType = Type; - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); +} // namespace TargetStruct +} // namespace Structs - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = DataModel::NullObjectType; +namespace Binding { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Binding::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace Binding +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - chip::BitMask optionsMask = static_cast>(0); - chip::BitMask optionsOverride = static_cast>(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } }; -}; // namespace StopWithOnOff -namespace MoveToClosestFrequency { -enum class Fields : uint8_t +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - kFrequency = 0, + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } }; - -struct Type +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MoveToClosestFrequency::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - - uint16_t frequency = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +}; +} // namespace ClusterRevision - using ResponseType = DataModel::NullObjectType; +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Binding::TypeInfo::DecodableType binding; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace Binding +namespace AccessControl { +namespace Structs { +namespace AccessControlTargetStruct { +enum class Fields : uint8_t +{ + kCluster = 0, + kEndpoint = 1, + kDeviceType = 2, }; -struct DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::MoveToClosestFrequency::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + DataModel::Nullable cluster; + DataModel::Nullable endpoint; + DataModel::Nullable deviceType; - uint16_t frequency = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -}; // namespace MoveToClosestFrequency -} // namespace Commands -namespace Attributes { +using DecodableType = Type; -namespace CurrentLevel { -struct TypeInfo +} // namespace AccessControlTargetStruct +namespace AccessControlEntryStruct { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + kPrivilege = 1, + kAuthMode = 2, + kSubjects = 3, + kTargets = 4, + kFabricIndex = 254, +}; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + AccessControlEntryPrivilegeEnum privilege = static_cast(0); + AccessControlEntryAuthModeEnum authMode = static_cast(0); + DataModel::Nullable> subjects; + DataModel::Nullable> targets; + chip::FabricIndex fabricIndex = static_cast(0); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -} // namespace CurrentLevel -namespace RemainingTime { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + AccessControlEntryPrivilegeEnum privilege = static_cast(0); + AccessControlEntryAuthModeEnum authMode = static_cast(0); + DataModel::Nullable> subjects; + DataModel::Nullable> targets; + chip::FabricIndex fabricIndex = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemainingTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } }; -} // namespace RemainingTime -namespace MinLevel { -struct TypeInfo + +} // namespace AccessControlEntryStruct +namespace AccessControlExtensionStruct { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + kData = 1, + kFabricIndex = 254, +}; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + chip::ByteSpan data; + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -} // namespace MinLevel -namespace MaxLevel { + +using DecodableType = Type; + +} // namespace AccessControlExtensionStruct +} // namespace Structs + +namespace Attributes { + +namespace Acl { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Acl::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxLevel -namespace CurrentFrequency { +} // namespace Acl +namespace Extension { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFrequency::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Extension::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentFrequency -namespace MinFrequency { +} // namespace Extension +namespace SubjectsPerAccessControlEntry { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinFrequency::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SubjectsPerAccessControlEntry::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MinFrequency -namespace MaxFrequency { +} // namespace SubjectsPerAccessControlEntry +namespace TargetsPerAccessControlEntry { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxFrequency::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxFrequency -namespace Options { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Options::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetsPerAccessControlEntry::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Options -namespace OnOffTransitionTime { +} // namespace TargetsPerAccessControlEntry +namespace AccessControlEntriesPerFabric { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnOffTransitionTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AccessControlEntriesPerFabric::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OnOffTransitionTime -namespace OnLevel { -struct TypeInfo +} // namespace AccessControlEntriesPerFabric +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; -} // namespace OnLevel -namespace OnTransitionTime { -struct TypeInfo +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnTransitionTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OnTransitionTime -namespace OffTransitionTime { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OffTransitionTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OffTransitionTime -namespace DefaultMoveRate { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DefaultMoveRate::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DefaultMoveRate -namespace StartUpCurrentLevel { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpCurrentLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpCurrentLevel -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } }; } // namespace ClusterRevision @@ -3059,25 +2740,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel; - Attributes::RemainingTime::TypeInfo::DecodableType remainingTime = static_cast(0); - Attributes::MinLevel::TypeInfo::DecodableType minLevel = static_cast(0); - Attributes::MaxLevel::TypeInfo::DecodableType maxLevel = static_cast(0); - Attributes::CurrentFrequency::TypeInfo::DecodableType currentFrequency = static_cast(0); - Attributes::MinFrequency::TypeInfo::DecodableType minFrequency = static_cast(0); - Attributes::MaxFrequency::TypeInfo::DecodableType maxFrequency = static_cast(0); - Attributes::Options::TypeInfo::DecodableType options = - static_cast>(0); - Attributes::OnOffTransitionTime::TypeInfo::DecodableType onOffTransitionTime = static_cast(0); - Attributes::OnLevel::TypeInfo::DecodableType onLevel; - Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; - Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; - Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; + Attributes::Acl::TypeInfo::DecodableType acl; + Attributes::Extension::TypeInfo::DecodableType extension; + Attributes::SubjectsPerAccessControlEntry::TypeInfo::DecodableType subjectsPerAccessControlEntry = static_cast(0); + Attributes::TargetsPerAccessControlEntry::TypeInfo::DecodableType targetsPerAccessControlEntry = static_cast(0); + Attributes::AccessControlEntriesPerFabric::TypeInfo::DecodableType accessControlEntriesPerFabric = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -3087,259 +2758,125 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LevelControl -namespace BinaryInputBasic { - -namespace Attributes { +namespace Events { +namespace AccessControlEntryChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace ActiveText { -struct TypeInfo +enum class Fields : uint8_t { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveText::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; -} // namespace ActiveText -namespace Description { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace Description -namespace InactiveText { -struct TypeInfo +struct Type { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr bool kIsFabricScoped = true; - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InactiveText::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace InactiveText -namespace OutOfService { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; + chip::FabricIndex fabricIndex = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OutOfService::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OutOfService -namespace Polarity { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + auto GetFabricIndex() const { return fabricIndex; } - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Polarity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Polarity -namespace PresentValue { -struct TypeInfo + +struct DecodableType { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PresentValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PresentValue -namespace Reliability { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +} // namespace AccessControlEntryChanged +namespace AccessControlExtensionChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Reliability::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ + kAdminNodeID = 1, + kAdminPasscodeID = 2, + kChangeType = 3, + kLatestValue = 4, + kFabricIndex = 254, }; -} // namespace Reliability -namespace StatusFlags { -struct TypeInfo + +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr bool kIsFabricScoped = true; - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StatusFlags::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; + chip::FabricIndex fabricIndex = static_cast(0); + + auto GetFabricIndex() const { return fabricIndex; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace StatusFlags -namespace ApplicationType { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable adminNodeID; + DataModel::Nullable adminPasscodeID; + ChangeTypeEnum changeType = static_cast(0); + DataModel::Nullable latestValue; + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ApplicationType -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::ActiveText::TypeInfo::DecodableType activeText; - Attributes::Description::TypeInfo::DecodableType description; - Attributes::InactiveText::TypeInfo::DecodableType inactiveText; - Attributes::OutOfService::TypeInfo::DecodableType outOfService = static_cast(0); - Attributes::Polarity::TypeInfo::DecodableType polarity = static_cast(0); - Attributes::PresentValue::TypeInfo::DecodableType presentValue = static_cast(0); - Attributes::Reliability::TypeInfo::DecodableType reliability = static_cast(0); - Attributes::StatusFlags::TypeInfo::DecodableType statusFlags = static_cast(0); - Attributes::ApplicationType::TypeInfo::DecodableType applicationType = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace BinaryInputBasic -namespace PulseWidthModulation { - -namespace Attributes { - -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::PulseWidthModulation::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace PulseWidthModulation -namespace Descriptor { +} // namespace AccessControlExtensionChanged +} // namespace Events +} // namespace AccessControl +namespace Actions { namespace Structs { -namespace DeviceTypeStruct { +namespace ActionStruct { enum class Fields : uint8_t { - kDeviceType = 0, - kRevision = 1, + kActionID = 0, + kName = 1, + kType = 2, + kEndpointListID = 3, + kSupportedCommands = 4, + kState = 5, }; struct Type { public: - chip::DeviceTypeId deviceType = static_cast(0); - uint16_t revision = static_cast(0); + uint16_t actionID = static_cast(0); + chip::CharSpan name; + ActionTypeEnum type = static_cast(0); + uint16_t endpointListID = static_cast(0); + chip::BitMask supportedCommands = static_cast>(0); + ActionStateEnum state = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -3350,485 +2887,624 @@ struct Type using DecodableType = Type; -} // namespace DeviceTypeStruct -namespace SemanticTagStruct { +} // namespace ActionStruct +namespace EndpointListStruct { enum class Fields : uint8_t { - kMfgCode = 0, - kNamespaceID = 1, - kTag = 2, - kLabel = 3, + kEndpointListID = 0, + kName = 1, + kType = 2, + kEndpoints = 3, }; struct Type { public: - DataModel::Nullable mfgCode; - uint8_t namespaceID = static_cast(0); - uint8_t tag = static_cast(0); - Optional> label; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + uint16_t endpointListID = static_cast(0); + chip::CharSpan name; + EndpointListTypeEnum type = static_cast(0); + DataModel::List endpoints; static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + uint16_t endpointListID = static_cast(0); + chip::CharSpan name; + EndpointListTypeEnum type = static_cast(0); + DataModel::DecodableList endpoints; -} // namespace SemanticTagStruct -} // namespace Structs + CHIP_ERROR Decode(TLV::TLVReader & reader); -namespace Attributes { + static constexpr bool kIsFabricScoped = false; +}; -namespace DeviceTypeList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; +} // namespace EndpointListStruct +} // namespace Structs - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DeviceTypeList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DeviceTypeList -namespace ServerList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +namespace Commands { +// Forward-declarations so we can reference these later. - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ServerList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ServerList -namespace ClientList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +namespace InstantAction { +struct Type; +struct DecodableType; +} // namespace InstantAction - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ClientList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ClientList -namespace PartsList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +namespace InstantActionWithTransition { +struct Type; +struct DecodableType; +} // namespace InstantActionWithTransition - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PartsList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PartsList -namespace TagList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; +namespace StartAction { +struct Type; +struct DecodableType; +} // namespace StartAction - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TagList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TagList -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +namespace StartActionWithDuration { +struct Type; +struct DecodableType; +} // namespace StartActionWithDuration + +namespace StopAction { +struct Type; +struct DecodableType; +} // namespace StopAction + +namespace PauseAction { +struct Type; +struct DecodableType; +} // namespace PauseAction + +namespace PauseActionWithDuration { +struct Type; +struct DecodableType; +} // namespace PauseActionWithDuration + +namespace ResumeAction { +struct Type; +struct DecodableType; +} // namespace ResumeAction + +namespace EnableAction { +struct Type; +struct DecodableType; +} // namespace EnableAction + +namespace EnableActionWithDuration { +struct Type; +struct DecodableType; +} // namespace EnableActionWithDuration + +namespace DisableAction { +struct Type; +struct DecodableType; +} // namespace DisableAction + +namespace DisableActionWithDuration { +struct Type; +struct DecodableType; +} // namespace DisableActionWithDuration + +} // namespace Commands + +namespace Commands { +namespace InstantAction { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + kActionID = 0, + kInvokeID = 1, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +}; // namespace InstantAction +namespace InstantActionWithTransition { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } + kActionID = 0, + kInvokeID = 1, + kTransitionTime = 2, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + uint16_t transitionTime = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::Descriptor::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - Attributes::DeviceTypeList::TypeInfo::DecodableType deviceTypeList; - Attributes::ServerList::TypeInfo::DecodableType serverList; - Attributes::ClientList::TypeInfo::DecodableType clientList; - Attributes::PartsList::TypeInfo::DecodableType partsList; - Attributes::TagList::TypeInfo::DecodableType tagList; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + uint16_t actionID = static_cast(0); + Optional invokeID; + uint16_t transitionTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace Descriptor -namespace Binding { -namespace Structs { -namespace TargetStruct { +}; // namespace InstantActionWithTransition +namespace StartAction { enum class Fields : uint8_t { - kNode = 1, - kGroup = 2, - kEndpoint = 3, - kCluster = 4, - kFabricIndex = 254, + kActionID = 0, + kInvokeID = 1, }; struct Type { public: - Optional node; - Optional group; - Optional endpoint; - Optional cluster; - chip::FabricIndex fabricIndex = static_cast(0); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + uint16_t actionID = static_cast(0); + Optional invokeID; - static constexpr bool kIsFabricScoped = true; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - auto GetFabricIndex() const { return fabricIndex; } + using ResponseType = DataModel::NullObjectType; - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + static constexpr bool MustUseTimedInvoke() { return false; } +}; - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StartAction +namespace StartActionWithDuration { +enum class Fields : uint8_t +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, }; -using DecodableType = Type; +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } -} // namespace TargetStruct -} // namespace Structs + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); -namespace Attributes { + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Binding { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Binding::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Binding -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +}; // namespace StartActionWithDuration +namespace StopAction { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + kActionID = 0, + kInvokeID = 1, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace StopAction +namespace PauseAction { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } + kActionID = 0, + kInvokeID = 1, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::Binding::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + uint16_t actionID = static_cast(0); + Optional invokeID; - Attributes::Binding::TypeInfo::DecodableType binding; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -} // namespace Binding -namespace AccessControl { -namespace Structs { -namespace AccessControlTargetStruct { + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace PauseAction +namespace PauseActionWithDuration { enum class Fields : uint8_t { - kCluster = 0, - kEndpoint = 1, - kDeviceType = 2, + kActionID = 0, + kInvokeID = 1, + kDuration = 2, }; struct Type { public: - DataModel::Nullable cluster; - DataModel::Nullable endpoint; - DataModel::Nullable deviceType; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - static constexpr bool kIsFabricScoped = false; + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } -} // namespace AccessControlTargetStruct -namespace AccessControlEntryStruct { + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace PauseActionWithDuration +namespace ResumeAction { enum class Fields : uint8_t { - kPrivilege = 1, - kAuthMode = 2, - kSubjects = 3, - kTargets = 4, - kFabricIndex = 254, + kActionID = 0, + kInvokeID = 1, }; struct Type { public: - AccessControlEntryPrivilegeEnum privilege = static_cast(0); - AccessControlEntryAuthModeEnum authMode = static_cast(0); - DataModel::Nullable> subjects; - DataModel::Nullable> targets; - chip::FabricIndex fabricIndex = static_cast(0); - - static constexpr bool kIsFabricScoped = true; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - auto GetFabricIndex() const { return fabricIndex; } + uint16_t actionID = static_cast(0); + Optional invokeID; - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + using ResponseType = DataModel::NullObjectType; -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - AccessControlEntryPrivilegeEnum privilege = static_cast(0); - AccessControlEntryAuthModeEnum authMode = static_cast(0); - DataModel::Nullable> subjects; - DataModel::Nullable> targets; - chip::FabricIndex fabricIndex = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + uint16_t actionID = static_cast(0); + Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = true; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } }; - -} // namespace AccessControlEntryStruct -namespace AccessControlExtensionStruct { +}; // namespace ResumeAction +namespace EnableAction { enum class Fields : uint8_t { - kData = 1, - kFabricIndex = 254, + kActionID = 0, + kInvokeID = 1, }; struct Type { public: - chip::ByteSpan data; - chip::FabricIndex fabricIndex = static_cast(0); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + uint16_t actionID = static_cast(0); + Optional invokeID; - static constexpr bool kIsFabricScoped = true; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - auto GetFabricIndex() const { return fabricIndex; } + using ResponseType = DataModel::NullObjectType; - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + static constexpr bool MustUseTimedInvoke() { return false; } +}; - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnableAction +namespace EnableActionWithDuration { +enum class Fields : uint8_t +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, }; -using DecodableType = Type; +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } -} // namespace AccessControlExtensionStruct -} // namespace Structs + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); -namespace Attributes { + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Acl { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> &; + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Acl::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Acl -namespace Extension { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Extension::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Extension -namespace SubjectsPerAccessControlEntry { -struct TypeInfo +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SubjectsPerAccessControlEntry::Id; } + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnableActionWithDuration +namespace DisableAction { +enum class Fields : uint8_t +{ + kActionID = 0, + kInvokeID = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace DisableAction +namespace DisableActionWithDuration { +enum class Fields : uint8_t +{ + kActionID = 0, + kInvokeID = 1, + kDuration = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + + uint16_t actionID = static_cast(0); + Optional invokeID; + uint32_t duration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace DisableActionWithDuration +} // namespace Commands + +namespace Attributes { + +namespace ActionList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActionList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SubjectsPerAccessControlEntry -namespace TargetsPerAccessControlEntry { +} // namespace ActionList +namespace EndpointLists { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetsPerAccessControlEntry::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndpointLists::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TargetsPerAccessControlEntry -namespace AccessControlEntriesPerFabric { +} // namespace EndpointLists +namespace SetupURL { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AccessControlEntriesPerFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetupURL::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 512; } }; -} // namespace AccessControlEntriesPerFabric +} // namespace SetupURL namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } }; } // namespace ClusterRevision @@ -3836,15 +3512,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Acl::TypeInfo::DecodableType acl; - Attributes::Extension::TypeInfo::DecodableType extension; - Attributes::SubjectsPerAccessControlEntry::TypeInfo::DecodableType subjectsPerAccessControlEntry = static_cast(0); - Attributes::TargetsPerAccessControlEntry::TypeInfo::DecodableType targetsPerAccessControlEntry = static_cast(0); - Attributes::AccessControlEntriesPerFabric::TypeInfo::DecodableType accessControlEntriesPerFabric = static_cast(0); + Attributes::ActionList::TypeInfo::DecodableType actionList; + Attributes::EndpointLists::TypeInfo::DecodableType endpointLists; + Attributes::SetupURL::TypeInfo::DecodableType setupURL; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -3855,33 +3529,27 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace AccessControlEntryChanged { +namespace StateChanged { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kFabricIndex = 254, + kActionID = 0, + kInvokeID = 1, + kNewState = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr bool kIsFabricScoped = true; - - DataModel::Nullable adminNodeID; - DataModel::Nullable adminPasscodeID; - ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; - chip::FabricIndex fabricIndex = static_cast(0); + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr bool kIsFabricScoped = false; - auto GetFabricIndex() const { return fabricIndex; } + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -3890,45 +3558,39 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessControlEntryChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr EventId GetEventId() { return Events::StateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - DataModel::Nullable adminNodeID; - DataModel::Nullable adminPasscodeID; - ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; - chip::FabricIndex fabricIndex = static_cast(0); + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AccessControlEntryChanged -namespace AccessControlExtensionChanged { +} // namespace StateChanged +namespace ActionFailed { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kAdminNodeID = 1, - kAdminPasscodeID = 2, - kChangeType = 3, - kLatestValue = 4, - kFabricIndex = 254, + kActionID = 0, + kInvokeID = 1, + kNewState = 2, + kError = 3, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr bool kIsFabricScoped = true; - - DataModel::Nullable adminNodeID; - DataModel::Nullable adminPasscodeID; - ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; - chip::FabricIndex fabricIndex = static_cast(0); + static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr bool kIsFabricScoped = false; - auto GetFabricIndex() const { return fabricIndex; } + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); + ActionErrorEnum error = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -3937,42 +3599,33 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessControlExtensionChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } + static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - DataModel::Nullable adminNodeID; - DataModel::Nullable adminPasscodeID; - ChangeTypeEnum changeType = static_cast(0); - DataModel::Nullable latestValue; - chip::FabricIndex fabricIndex = static_cast(0); + uint16_t actionID = static_cast(0); + uint32_t invokeID = static_cast(0); + ActionStateEnum newState = static_cast(0); + ActionErrorEnum error = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AccessControlExtensionChanged +} // namespace ActionFailed } // namespace Events -} // namespace AccessControl -namespace Actions { +} // namespace Actions +namespace BasicInformation { namespace Structs { -namespace ActionStruct { +namespace CapabilityMinimaStruct { enum class Fields : uint8_t { - kActionID = 0, - kName = 1, - kType = 2, - kEndpointListID = 3, - kSupportedCommands = 4, - kState = 5, + kCaseSessionsPerFabric = 0, + kSubscriptionsPerFabric = 1, }; struct Type { public: - uint16_t actionID = static_cast(0); - chip::CharSpan name; - ActionTypeEnum type = static_cast(0); - uint16_t endpointListID = static_cast(0); - chip::BitMask supportedCommands = static_cast>(0); - ActionStateEnum state = static_cast(0); + uint16_t caseSessionsPerFabric = static_cast(0); + uint16_t subscriptionsPerFabric = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -3983,127 +3636,54 @@ struct Type using DecodableType = Type; -} // namespace ActionStruct -namespace EndpointListStruct { +} // namespace CapabilityMinimaStruct +namespace ProductAppearanceStruct { enum class Fields : uint8_t { - kEndpointListID = 0, - kName = 1, - kType = 2, - kEndpoints = 3, + kFinish = 0, + kPrimaryColor = 1, }; struct Type { public: - uint16_t endpointListID = static_cast(0); - chip::CharSpan name; - EndpointListTypeEnum type = static_cast(0); - DataModel::List endpoints; + ProductFinishEnum finish = static_cast(0); + DataModel::Nullable primaryColor; + + CHIP_ERROR Decode(TLV::TLVReader & reader); static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - uint16_t endpointListID = static_cast(0); - chip::CharSpan name; - EndpointListTypeEnum type = static_cast(0); - DataModel::DecodableList endpoints; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; -}; +using DecodableType = Type; -} // namespace EndpointListStruct +} // namespace ProductAppearanceStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace InstantAction { -struct Type; -struct DecodableType; -} // namespace InstantAction - -namespace InstantActionWithTransition { -struct Type; -struct DecodableType; -} // namespace InstantActionWithTransition - -namespace StartAction { -struct Type; -struct DecodableType; -} // namespace StartAction - -namespace StartActionWithDuration { -struct Type; -struct DecodableType; -} // namespace StartActionWithDuration - -namespace StopAction { -struct Type; -struct DecodableType; -} // namespace StopAction - -namespace PauseAction { -struct Type; -struct DecodableType; -} // namespace PauseAction - -namespace PauseActionWithDuration { -struct Type; -struct DecodableType; -} // namespace PauseActionWithDuration - -namespace ResumeAction { -struct Type; -struct DecodableType; -} // namespace ResumeAction - -namespace EnableAction { -struct Type; -struct DecodableType; -} // namespace EnableAction - -namespace EnableActionWithDuration { -struct Type; -struct DecodableType; -} // namespace EnableActionWithDuration - -namespace DisableAction { -struct Type; -struct DecodableType; -} // namespace DisableAction - -namespace DisableActionWithDuration { +namespace MfgSpecificPing { struct Type; struct DecodableType; -} // namespace DisableActionWithDuration +} // namespace MfgSpecificPing } // namespace Commands namespace Commands { -namespace InstantAction { +namespace MfgSpecificPing { enum class Fields : uint8_t { - kActionID = 0, - kInvokeID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; + static constexpr CommandId GetCommandId() { return Commands::MfgSpecificPing::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -4115,492 +3695,338 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::InstantAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr CommandId GetCommandId() { return Commands::MfgSpecificPing::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - uint16_t actionID = static_cast(0); - Optional invokeID; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace InstantAction -namespace InstantActionWithTransition { -enum class Fields : uint8_t -{ - kActionID = 0, - kInvokeID = 1, - kTransitionTime = 2, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint16_t transitionTime = static_cast(0); +}; // namespace MfgSpecificPing +} // namespace Commands - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = DataModel::NullObjectType; +namespace DataModelRevision { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DataModelRevision::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace DataModelRevision +namespace VendorName { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::InstantActionWithTransition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - uint16_t actionID = static_cast(0); - Optional invokeID; - uint16_t transitionTime = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; -}; // namespace InstantActionWithTransition -namespace StartAction { -enum class Fields : uint8_t +} // namespace VendorName +namespace VendorID { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, -}; + using Type = chip::VendorId; + using DecodableType = chip::VendorId; + using DecodableArgType = chip::VendorId; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace VendorID +namespace ProductName { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; - -struct DecodableType +} // namespace ProductName +namespace ProductID { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StartAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace StartAction -namespace StartActionWithDuration { -enum class Fields : uint8_t +} // namespace ProductID +namespace NodeLabel { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, - kDuration = 2, -}; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NodeLabel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace NodeLabel +namespace Location { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Location::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 2; } }; - -struct DecodableType +} // namespace Location +namespace HardwareVersion { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StartActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StartActionWithDuration -namespace StopAction { -enum class Fields : uint8_t -{ - kActionID = 0, - kInvokeID = 1, + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct Type +} // namespace HardwareVersion +namespace HardwareVersionString { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersionString::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } }; - -struct DecodableType +} // namespace HardwareVersionString +namespace SoftwareVersion { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::StopAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace StopAction -namespace PauseAction { -enum class Fields : uint8_t +} // namespace SoftwareVersion +namespace SoftwareVersionString { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, -}; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersionString::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace SoftwareVersionString +namespace ManufacturingDate { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ManufacturingDate::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } }; - -struct DecodableType +} // namespace ManufacturingDate +namespace PartNumber { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::PauseAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PartNumber::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; -}; // namespace PauseAction -namespace PauseActionWithDuration { -enum class Fields : uint8_t +} // namespace PartNumber +namespace ProductURL { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, - kDuration = 2, -}; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductURL::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 256; } +}; +} // namespace ProductURL +namespace ProductLabel { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductLabel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } }; - -struct DecodableType +} // namespace ProductLabel +namespace SerialNumber { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::PauseActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SerialNumber::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; -}; // namespace PauseActionWithDuration -namespace ResumeAction { -enum class Fields : uint8_t +} // namespace SerialNumber +namespace LocalConfigDisabled { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, -}; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalConfigDisabled::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LocalConfigDisabled +namespace Reachable { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Reachable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace Reachable +namespace UniqueID { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ResumeAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UniqueID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } }; -}; // namespace ResumeAction -namespace EnableAction { -enum class Fields : uint8_t +} // namespace UniqueID +namespace CapabilityMinima { +struct TypeInfo { - kActionID = 0, - kInvokeID = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::EnableAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace EnableAction -namespace EnableActionWithDuration { -enum class Fields : uint8_t -{ - kActionID = 0, - kInvokeID = 1, - kDuration = 2, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::EnableActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace EnableActionWithDuration -namespace DisableAction { -enum class Fields : uint8_t -{ - kActionID = 0, - kInvokeID = 1, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::DisableAction::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace DisableAction -namespace DisableActionWithDuration { -enum class Fields : uint8_t -{ - kActionID = 0, - kInvokeID = 1, - kDuration = 2, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::DisableActionWithDuration::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + using Type = chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::Type; + using DecodableType = chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType &; - uint16_t actionID = static_cast(0); - Optional invokeID; - uint32_t duration = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CapabilityMinima::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace DisableActionWithDuration -} // namespace Commands - -namespace Attributes { - -namespace ActionList { +} // namespace CapabilityMinima +namespace ProductAppearance { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type; + using DecodableType = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActionList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActionList -namespace EndpointLists { +} // namespace ProductAppearance +namespace SpecificationVersion { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EndpointLists::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpecificationVersion::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EndpointLists -namespace SetupURL { +} // namespace SpecificationVersion +namespace MaxPathsPerInvoke { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetupURL::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPathsPerInvoke::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 512; } }; -} // namespace SetupURL +} // namespace MaxPathsPerInvoke namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } }; } // namespace ClusterRevision @@ -4608,13 +4034,33 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::ActionList::TypeInfo::DecodableType actionList; - Attributes::EndpointLists::TypeInfo::DecodableType endpointLists; - Attributes::SetupURL::TypeInfo::DecodableType setupURL; + Attributes::DataModelRevision::TypeInfo::DecodableType dataModelRevision = static_cast(0); + Attributes::VendorName::TypeInfo::DecodableType vendorName; + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); + Attributes::ProductName::TypeInfo::DecodableType productName; + Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); + Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; + Attributes::Location::TypeInfo::DecodableType location; + Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); + Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; + Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); + Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; + Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; + Attributes::PartNumber::TypeInfo::DecodableType partNumber; + Attributes::ProductURL::TypeInfo::DecodableType productURL; + Attributes::ProductLabel::TypeInfo::DecodableType productLabel; + Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; + Attributes::LocalConfigDisabled::TypeInfo::DecodableType localConfigDisabled = static_cast(0); + Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); + Attributes::UniqueID::TypeInfo::DecodableType uniqueID; + Attributes::CapabilityMinima::TypeInfo::DecodableType capabilityMinima; + Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; + Attributes::SpecificationVersion::TypeInfo::DecodableType specificationVersion = static_cast(0); + Attributes::MaxPathsPerInvoke::TypeInfo::DecodableType maxPathsPerInvoke = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -4625,27 +4071,23 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace StateChanged { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +namespace StartUp { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kActionID = 0, - kInvokeID = 1, - kNewState = 2, + kSoftwareVersion = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - uint16_t actionID = static_cast(0); - uint32_t invokeID = static_cast(0); - ActionStateEnum newState = static_cast(0); + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -4654,40 +4096,29 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - uint32_t invokeID = static_cast(0); - ActionStateEnum newState = static_cast(0); + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace StateChanged -namespace ActionFailed { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace StartUp +namespace ShutDown { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kActionID = 0, - kInvokeID = 1, - kNewState = 2, - kError = 3, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - uint16_t actionID = static_cast(0); - uint32_t invokeID = static_cast(0); - ActionStateEnum newState = static_cast(0); - ActionErrorEnum error = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -4695,95 +4126,145 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ActionFailed::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Actions::Id; } - - uint16_t actionID = static_cast(0); - uint32_t invokeID = static_cast(0); - ActionStateEnum newState = static_cast(0); - ActionErrorEnum error = static_cast(0); + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ActionFailed -} // namespace Events -} // namespace Actions -namespace BasicInformation { -namespace Structs { -namespace CapabilityMinimaStruct { +} // namespace ShutDown +namespace Leave { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kCaseSessionsPerFabric = 0, - kSubscriptionsPerFabric = 1, + kFabricIndex = 0, }; struct Type { public: - uint16_t caseSessionsPerFabric = static_cast(0); - uint16_t subscriptionsPerFabric = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } static constexpr bool kIsFabricScoped = false; + chip::FabricIndex fabricIndex = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Leave +namespace ReachableChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -} // namespace CapabilityMinimaStruct -namespace ProductAppearanceStruct { enum class Fields : uint8_t { - kFinish = 0, - kPrimaryColor = 1, + kReachableNewValue = 0, }; struct Type { public: - ProductFinishEnum finish = static_cast(0); - DataModel::Nullable primaryColor; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } static constexpr bool kIsFabricScoped = false; + bool reachableNewValue = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } -} // namespace ProductAppearanceStruct -} // namespace Structs + bool reachableNewValue = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ReachableChanged +} // namespace Events +} // namespace BasicInformation +namespace OtaSoftwareUpdateProvider { namespace Commands { // Forward-declarations so we can reference these later. -namespace MfgSpecificPing { +namespace QueryImage { struct Type; struct DecodableType; -} // namespace MfgSpecificPing +} // namespace QueryImage + +namespace QueryImageResponse { +struct Type; +struct DecodableType; +} // namespace QueryImageResponse + +namespace ApplyUpdateRequest { +struct Type; +struct DecodableType; +} // namespace ApplyUpdateRequest + +namespace ApplyUpdateResponse { +struct Type; +struct DecodableType; +} // namespace ApplyUpdateResponse + +namespace NotifyUpdateApplied { +struct Type; +struct DecodableType; +} // namespace NotifyUpdateApplied } // namespace Commands namespace Commands { -namespace MfgSpecificPing { +namespace QueryImage { enum class Fields : uint8_t { + kVendorID = 0, + kProductID = 1, + kSoftwareVersion = 2, + kProtocolsSupported = 3, + kHardwareVersion = 4, + kLocation = 5, + kRequestorCanConsent = 6, + kMetadataForProvider = 7, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::MfgSpecificPing::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); + uint32_t softwareVersion = static_cast(0); + DataModel::List protocolsSupported; + Optional hardwareVersion; + Optional location; + Optional requestorCanConsent; + Optional metadataForProvider; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -4791,338 +4272,417 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::MfgSpecificPing::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); + uint32_t softwareVersion = static_cast(0); + DataModel::DecodableList protocolsSupported; + Optional hardwareVersion; + Optional location; + Optional requestorCanConsent; + Optional metadataForProvider; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace MfgSpecificPing -} // namespace Commands - -namespace Attributes { - -namespace DataModelRevision { -struct TypeInfo +}; // namespace QueryImage +namespace QueryImageResponse { +enum class Fields : uint8_t { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DataModelRevision::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStatus = 0, + kDelayedActionTime = 1, + kImageURI = 2, + kSoftwareVersion = 3, + kSoftwareVersionString = 4, + kUpdateToken = 5, + kUserConsentNeeded = 6, + kMetadataForRequestor = 7, }; -} // namespace DataModelRevision -namespace VendorName { -struct TypeInfo + +struct Type { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + StatusEnum status = static_cast(0); + Optional delayedActionTime; + Optional imageURI; + Optional softwareVersion; + Optional softwareVersionString; + Optional updateToken; + Optional userConsentNeeded; + Optional metadataForRequestor; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace VendorName -namespace VendorID { -struct TypeInfo + +struct DecodableType { - using Type = chip::VendorId; - using DecodableType = chip::VendorId; - using DecodableArgType = chip::VendorId; +public: + static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + StatusEnum status = static_cast(0); + Optional delayedActionTime; + Optional imageURI; + Optional softwareVersion; + Optional softwareVersionString; + Optional updateToken; + Optional userConsentNeeded; + Optional metadataForRequestor; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace VendorID -namespace ProductName { -struct TypeInfo +}; // namespace QueryImageResponse +namespace ApplyUpdateRequest { +enum class Fields : uint8_t { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + kUpdateToken = 0, + kNewVersion = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductName::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } -}; -} // namespace ProductName -namespace ProductID { -struct TypeInfo +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductID::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::ByteSpan updateToken; + uint32_t newVersion = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ProductID -namespace NodeLabel { -struct TypeInfo + +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NodeLabel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + chip::ByteSpan updateToken; + uint32_t newVersion = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace NodeLabel -namespace Location { -struct TypeInfo +}; // namespace ApplyUpdateRequest +namespace ApplyUpdateResponse { +enum class Fields : uint8_t { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Location::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 2; } + kAction = 0, + kDelayedActionTime = 1, }; -} // namespace Location -namespace HardwareVersion { -struct TypeInfo + +struct Type { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + ApplyUpdateActionEnum action = static_cast(0); + uint32_t delayedActionTime = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace HardwareVersion -namespace HardwareVersionString { -struct TypeInfo + +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersionString::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } + ApplyUpdateActionEnum action = static_cast(0); + uint32_t delayedActionTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace HardwareVersionString -namespace SoftwareVersion { -struct TypeInfo +}; // namespace ApplyUpdateResponse +namespace NotifyUpdateApplied { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kUpdateToken = 0, + kSoftwareVersion = 1, }; -} // namespace SoftwareVersion -namespace SoftwareVersionString { -struct TypeInfo + +struct Type { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersionString::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } + chip::ByteSpan updateToken; + uint32_t softwareVersion = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace SoftwareVersionString -namespace ManufacturingDate { -struct TypeInfo + +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ManufacturingDate::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } + chip::ByteSpan updateToken; + uint32_t softwareVersion = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ManufacturingDate -namespace PartNumber { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +}; // namespace NotifyUpdateApplied +} // namespace Commands - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PartNumber::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } +namespace Attributes { + +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace PartNumber -namespace ProductURL { -struct TypeInfo +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductURL::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 256; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace ProductURL -namespace ProductLabel { -struct TypeInfo +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductLabel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace ProductLabel -namespace SerialNumber { -struct TypeInfo +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SerialNumber::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace SerialNumber -namespace LocalConfigDisabled { -struct TypeInfo +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocalConfigDisabled::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace LocalConfigDisabled -namespace Reachable { -struct TypeInfo +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Reachable::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } }; -} // namespace Reachable -namespace UniqueID { +} // namespace ClusterRevision + struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UniqueID::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace UniqueID -namespace CapabilityMinima { +} // namespace Attributes +} // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { +namespace Structs { +namespace ProviderLocation { +enum class Fields : uint8_t +{ + kProviderNodeID = 1, + kEndpoint = 2, + kFabricIndex = 254, +}; + +struct Type +{ +public: + chip::NodeId providerNodeID = static_cast(0); + chip::EndpointId endpoint = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; +}; + +using DecodableType = Type; + +} // namespace ProviderLocation +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace AnnounceOTAProvider { +struct Type; +struct DecodableType; +} // namespace AnnounceOTAProvider + +} // namespace Commands + +namespace Commands { +namespace AnnounceOTAProvider { +enum class Fields : uint8_t +{ + kProviderNodeID = 0, + kVendorID = 1, + kAnnouncementReason = 2, + kMetadataForNode = 3, + kEndpoint = 4, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + + chip::NodeId providerNodeID = static_cast(0); + chip::VendorId vendorID = static_cast(0); + AnnouncementReasonEnum announcementReason = static_cast(0); + Optional metadataForNode; + chip::EndpointId endpoint = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + + chip::NodeId providerNodeID = static_cast(0); + chip::VendorId vendorID = static_cast(0); + AnnouncementReasonEnum announcementReason = static_cast(0); + Optional metadataForNode; + chip::EndpointId endpoint = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AnnounceOTAProvider +} // namespace Commands + +namespace Attributes { + +namespace DefaultOTAProviders { struct TypeInfo { - using Type = chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::Type; - using DecodableType = chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CapabilityMinima::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOTAProviders::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CapabilityMinima -namespace ProductAppearance { +} // namespace DefaultOTAProviders +namespace UpdatePossible { struct TypeInfo { - using Type = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type; - using DecodableType = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UpdatePossible::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ProductAppearance -namespace SpecificationVersion { +} // namespace UpdatePossible +namespace UpdateState { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; + using DecodableType = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; + using DecodableArgType = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpecificationVersion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UpdateState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SpecificationVersion -namespace MaxPathsPerInvoke { +} // namespace UpdateState +namespace UpdateStateProgress { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPathsPerInvoke::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UpdateStateProgress::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxPathsPerInvoke +} // namespace UpdateStateProgress namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } }; } // namespace ClusterRevision @@ -5130,33 +4690,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::DataModelRevision::TypeInfo::DecodableType dataModelRevision = static_cast(0); - Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); - Attributes::ProductName::TypeInfo::DecodableType productName; - Attributes::ProductID::TypeInfo::DecodableType productID = static_cast(0); - Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; - Attributes::Location::TypeInfo::DecodableType location; - Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); - Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; - Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); - Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; - Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; - Attributes::PartNumber::TypeInfo::DecodableType partNumber; - Attributes::ProductURL::TypeInfo::DecodableType productURL; - Attributes::ProductLabel::TypeInfo::DecodableType productLabel; - Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; - Attributes::LocalConfigDisabled::TypeInfo::DecodableType localConfigDisabled = static_cast(0); - Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); - Attributes::UniqueID::TypeInfo::DecodableType uniqueID; - Attributes::CapabilityMinima::TypeInfo::DecodableType capabilityMinima; - Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; - Attributes::SpecificationVersion::TypeInfo::DecodableType specificationVersion = static_cast(0); - Attributes::MaxPathsPerInvoke::TypeInfo::DecodableType maxPathsPerInvoke = static_cast(0); + Attributes::DefaultOTAProviders::TypeInfo::DecodableType defaultOTAProviders; + Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible = static_cast(0); + Attributes::UpdateState::TypeInfo::DecodableType updateState = + static_cast(0); + Attributes::UpdateStateProgress::TypeInfo::DecodableType updateStateProgress; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -5167,23 +4709,29 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace StartUp { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +namespace StateTransition { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kSoftwareVersion = 0, + kPreviousState = 0, + kNewState = 1, + kReason = 2, + kTargetSoftwareVersion = 3, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StartUp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::StateTransition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } static constexpr bool kIsFabricScoped = false; - uint32_t softwareVersion = static_cast(0); + UpdateStateEnum previousState = static_cast(0); + UpdateStateEnum newState = static_cast(0); + ChangeReasonEnum reason = static_cast(0); + DataModel::Nullable targetSoftwareVersion; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -5192,59 +4740,36 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StartUp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::StateTransition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - uint32_t softwareVersion = static_cast(0); + UpdateStateEnum previousState = static_cast(0); + UpdateStateEnum newState = static_cast(0); + ChangeReasonEnum reason = static_cast(0); + DataModel::Nullable targetSoftwareVersion; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace StartUp -namespace ShutDown { +} // namespace StateTransition +namespace VersionApplied { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kSoftwareVersion = 0, + kProductID = 1, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShutDown::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShutDown::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace ShutDown -namespace Leave { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t -{ - kFabricIndex = 0, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leave::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } - static constexpr bool kIsFabricScoped = false; - - chip::FabricIndex fabricIndex = static_cast(0); + uint32_t softwareVersion = static_cast(0); + uint16_t productID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -5253,31 +4778,38 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leave::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - chip::FabricIndex fabricIndex = static_cast(0); + uint32_t softwareVersion = static_cast(0); + uint16_t productID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Leave -namespace ReachableChanged { +} // namespace VersionApplied +namespace DownloadError { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kReachableNewValue = 0, + kSoftwareVersion = 0, + kBytesDownloaded = 1, + kProgressPercent = 2, + kPlatformCode = 3, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::DownloadError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } static constexpr bool kIsFabricScoped = false; - bool reachableNewValue = static_cast(0); + uint32_t softwareVersion = static_cast(0); + uint64_t bytesDownloaded = static_cast(0); + DataModel::Nullable progressPercent; + DataModel::Nullable platformCode; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -5286,298 +4818,329 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr EventId GetEventId() { return Events::DownloadError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - bool reachableNewValue = static_cast(0); + uint32_t softwareVersion = static_cast(0); + uint64_t bytesDownloaded = static_cast(0); + DataModel::Nullable progressPercent; + DataModel::Nullable platformCode; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ReachableChanged +} // namespace DownloadError } // namespace Events -} // namespace BasicInformation -namespace OtaSoftwareUpdateProvider { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace QueryImage { -struct Type; -struct DecodableType; -} // namespace QueryImage - -namespace QueryImageResponse { -struct Type; -struct DecodableType; -} // namespace QueryImageResponse - -namespace ApplyUpdateRequest { -struct Type; -struct DecodableType; -} // namespace ApplyUpdateRequest - -namespace ApplyUpdateResponse { -struct Type; -struct DecodableType; -} // namespace ApplyUpdateResponse - -namespace NotifyUpdateApplied { -struct Type; -struct DecodableType; -} // namespace NotifyUpdateApplied +} // namespace OtaSoftwareUpdateRequestor +namespace LocalizationConfiguration { -} // namespace Commands +namespace Attributes { -namespace Commands { -namespace QueryImage { -enum class Fields : uint8_t +namespace ActiveLocale { +struct TypeInfo { - kVendorID = 0, - kProductID = 1, - kSoftwareVersion = 2, - kProtocolsSupported = 3, - kHardwareVersion = 4, - kLocation = 5, - kRequestorCanConsent = 6, - kMetadataForProvider = 7, -}; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveLocale::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 35; } +}; +} // namespace ActiveLocale +namespace SupportedLocales { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - chip::VendorId vendorID = static_cast(0); - uint16_t productID = static_cast(0); - uint32_t softwareVersion = static_cast(0); - DataModel::List protocolsSupported; - Optional hardwareVersion; - Optional location; - Optional requestorCanConsent; - Optional metadataForProvider; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedLocales::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace SupportedLocales +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::QueryImage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - chip::VendorId vendorID = static_cast(0); - uint16_t productID = static_cast(0); - uint32_t softwareVersion = static_cast(0); - DataModel::DecodableList protocolsSupported; - Optional hardwareVersion; - Optional location; - Optional requestorCanConsent; - Optional metadataForProvider; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } }; -}; // namespace QueryImage -namespace QueryImageResponse { -enum class Fields : uint8_t +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - kStatus = 0, - kDelayedActionTime = 1, - kImageURI = 2, - kSoftwareVersion = 3, - kSoftwareVersionString = 4, - kUpdateToken = 5, - kUserConsentNeeded = 6, - kMetadataForRequestor = 7, + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } }; - -struct Type +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - StatusEnum status = static_cast(0); - Optional delayedActionTime; - Optional imageURI; - Optional softwareVersion; - Optional softwareVersionString; - Optional updateToken; - Optional userConsentNeeded; - Optional metadataForRequestor; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } }; - -struct DecodableType +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::QueryImageResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - StatusEnum status = static_cast(0); - Optional delayedActionTime; - Optional imageURI; - Optional softwareVersion; - Optional softwareVersionString; - Optional updateToken; - Optional userConsentNeeded; - Optional metadataForRequestor; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } }; -}; // namespace QueryImageResponse -namespace ApplyUpdateRequest { -enum class Fields : uint8_t +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - kUpdateToken = 0, - kNewVersion = 1, + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } - chip::ByteSpan updateToken; - uint32_t newVersion = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::ActiveLocale::TypeInfo::DecodableType activeLocale; + Attributes::SupportedLocales::TypeInfo::DecodableType supportedLocales; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace LocalizationConfiguration +namespace TimeFormatLocalization { - using ResponseType = Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace HourFormat { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; + using DecodableType = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; + using DecodableArgType = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HourFormat::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace HourFormat +namespace ActiveCalendarType { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; + using DecodableType = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; + using DecodableArgType = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveCalendarType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveCalendarType +namespace SupportedCalendarTypes { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - chip::ByteSpan updateToken; - uint32_t newVersion = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedCalendarTypes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ApplyUpdateRequest -namespace ApplyUpdateResponse { -enum class Fields : uint8_t +} // namespace SupportedCalendarTypes +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kAction = 0, - kDelayedActionTime = 1, + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - ApplyUpdateActionEnum action = static_cast(0); - uint32_t delayedActionTime = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ApplyUpdateResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } - - ApplyUpdateActionEnum action = static_cast(0); - uint32_t delayedActionTime = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } }; -}; // namespace ApplyUpdateResponse -namespace NotifyUpdateApplied { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kUpdateToken = 0, - kSoftwareVersion = 1, + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } - chip::ByteSpan updateToken; - uint32_t softwareVersion = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::HourFormat::TypeInfo::DecodableType hourFormat = + static_cast(0); + Attributes::ActiveCalendarType::TypeInfo::DecodableType activeCalendarType = + static_cast(0); + Attributes::SupportedCalendarTypes::TypeInfo::DecodableType supportedCalendarTypes; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace TimeFormatLocalization +namespace UnitLocalization { - using ResponseType = DataModel::NullObjectType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace TemperatureUnit { +struct TypeInfo +{ + using Type = chip::app::Clusters::UnitLocalization::TempUnitEnum; + using DecodableType = chip::app::Clusters::UnitLocalization::TempUnitEnum; + using DecodableArgType = chip::app::Clusters::UnitLocalization::TempUnitEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureUnit::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TemperatureUnit +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::NotifyUpdateApplied::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } - chip::ByteSpan updateToken; - uint32_t softwareVersion = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::TemperatureUnit::TypeInfo::DecodableType temperatureUnit = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace NotifyUpdateApplied -} // namespace Commands +} // namespace Attributes +} // namespace UnitLocalization +namespace PowerSourceConfiguration { namespace Attributes { +namespace Sources { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Sources::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Sources namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } }; } // namespace ClusterRevision @@ -5585,10 +5148,11 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateProvider::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::Sources::TypeInfo::DecodableType sources; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -5598,496 +5162,525 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OtaSoftwareUpdateProvider -namespace OtaSoftwareUpdateRequestor { +} // namespace PowerSourceConfiguration +namespace PowerSource { namespace Structs { -namespace ProviderLocation { +namespace BatChargeFaultChangeType { enum class Fields : uint8_t { - kProviderNodeID = 1, - kEndpoint = 2, - kFabricIndex = 254, + kCurrent = 0, + kPrevious = 1, }; struct Type { public: - chip::NodeId providerNodeID = static_cast(0); - chip::EndpointId endpoint = static_cast(0); - chip::FabricIndex fabricIndex = static_cast(0); + DataModel::List current; + DataModel::List previous; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr bool kIsFabricScoped = false; - static constexpr bool kIsFabricScoped = true; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; - auto GetFabricIndex() const { return fabricIndex; } +struct DecodableType +{ +public: + DataModel::DecodableList current; + DataModel::DecodableList previous; - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + CHIP_ERROR Decode(TLV::TLVReader & reader); - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + static constexpr bool kIsFabricScoped = false; +}; -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; +} // namespace BatChargeFaultChangeType +namespace BatFaultChangeType { +enum class Fields : uint8_t +{ + kCurrent = 0, + kPrevious = 1, }; -using DecodableType = Type; +struct Type +{ +public: + DataModel::List current; + DataModel::List previous; -} // namespace ProviderLocation -} // namespace Structs + static constexpr bool kIsFabricScoped = false; -namespace Commands { -// Forward-declarations so we can reference these later. + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; -namespace AnnounceOTAProvider { -struct Type; -struct DecodableType; -} // namespace AnnounceOTAProvider +struct DecodableType +{ +public: + DataModel::DecodableList current; + DataModel::DecodableList previous; -} // namespace Commands + CHIP_ERROR Decode(TLV::TLVReader & reader); -namespace Commands { -namespace AnnounceOTAProvider { + static constexpr bool kIsFabricScoped = false; +}; + +} // namespace BatFaultChangeType +namespace WiredFaultChangeType { enum class Fields : uint8_t { - kProviderNodeID = 0, - kVendorID = 1, - kAnnouncementReason = 2, - kMetadataForNode = 3, - kEndpoint = 4, + kCurrent = 0, + kPrevious = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + DataModel::List current; + DataModel::List previous; - chip::NodeId providerNodeID = static_cast(0); - chip::VendorId vendorID = static_cast(0); - AnnouncementReasonEnum announcementReason = static_cast(0); - Optional metadataForNode; - chip::EndpointId endpoint = static_cast(0); + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AnnounceOTAProvider::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + DataModel::DecodableList current; + DataModel::DecodableList previous; - chip::NodeId providerNodeID = static_cast(0); - chip::VendorId vendorID = static_cast(0); - AnnouncementReasonEnum announcementReason = static_cast(0); - Optional metadataForNode; - chip::EndpointId endpoint = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace AnnounceOTAProvider -} // namespace Commands + +} // namespace WiredFaultChangeType +} // namespace Structs namespace Attributes { -namespace DefaultOTAProviders { +namespace Status { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> &; + using Type = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; + using DecodableType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DefaultOTAProviders::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Status::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DefaultOTAProviders -namespace UpdatePossible { +} // namespace Status +namespace Order { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UpdatePossible::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Order::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UpdatePossible -namespace UpdateState { +} // namespace Order +namespace Description { struct TypeInfo { - using Type = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; - using DecodableType = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; - using DecodableArgType = chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UpdateState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 60; } }; -} // namespace UpdateState -namespace UpdateStateProgress { +} // namespace Description +namespace WiredAssessedInputVoltage { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UpdateStateProgress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedInputVoltage::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UpdateStateProgress -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace WiredAssessedInputVoltage +namespace WiredAssessedInputFrequency { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedInputFrequency::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace WiredAssessedInputFrequency +namespace WiredCurrentType { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + using DecodableType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredCurrentType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +} // namespace WiredCurrentType +namespace WiredAssessedCurrent { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedCurrent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace WiredAssessedCurrent +namespace WiredNominalVoltage { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredNominalVoltage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace WiredNominalVoltage +namespace WiredMaximumCurrent { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredMaximumCurrent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace WiredMaximumCurrent +namespace WiredPresent { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } -}; -} // namespace ClusterRevision + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiredPresent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace WiredPresent +namespace ActiveWiredFaults { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::DefaultOTAProviders::TypeInfo::DecodableType defaultOTAProviders; - Attributes::UpdatePossible::TypeInfo::DecodableType updatePossible = static_cast(0); - Attributes::UpdateState::TypeInfo::DecodableType updateState = - static_cast(0); - Attributes::UpdateStateProgress::TypeInfo::DecodableType updateStateProgress; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -namespace Events { -namespace StateTransition { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t -{ - kPreviousState = 0, - kNewState = 1, - kReason = 2, - kTargetSoftwareVersion = 3, + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveWiredFaults::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct Type +} // namespace ActiveWiredFaults +namespace BatVoltage { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateTransition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr bool kIsFabricScoped = false; - - UpdateStateEnum previousState = static_cast(0); - UpdateStateEnum newState = static_cast(0); - ChangeReasonEnum reason = static_cast(0); - DataModel::Nullable targetSoftwareVersion; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatVoltage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace BatVoltage +namespace BatPercentRemaining { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateTransition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - - UpdateStateEnum previousState = static_cast(0); - UpdateStateEnum newState = static_cast(0); - ChangeReasonEnum reason = static_cast(0); - DataModel::Nullable targetSoftwareVersion; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatPercentRemaining::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StateTransition -namespace VersionApplied { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - -enum class Fields : uint8_t +} // namespace BatPercentRemaining +namespace BatTimeRemaining { +struct TypeInfo { - kSoftwareVersion = 0, - kProductID = 1, -}; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatTimeRemaining::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatTimeRemaining +namespace BatChargeLevel { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr bool kIsFabricScoped = false; - - uint32_t softwareVersion = static_cast(0); - uint16_t productID = static_cast(0); + using Type = chip::app::Clusters::PowerSource::BatChargeLevelEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace BatChargeLevel +namespace BatReplacementNeeded { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::VersionApplied::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - - uint32_t softwareVersion = static_cast(0); - uint16_t productID = static_cast(0); + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatReplacementNeeded::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace VersionApplied -namespace DownloadError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace BatReplacementNeeded +namespace BatReplaceability { +struct TypeInfo { - kSoftwareVersion = 0, - kBytesDownloaded = 1, - kProgressPercent = 2, - kPlatformCode = 3, -}; + using Type = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatReplaceability::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatReplaceability +namespace BatPresent { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DownloadError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - static constexpr bool kIsFabricScoped = false; - - uint32_t softwareVersion = static_cast(0); - uint64_t bytesDownloaded = static_cast(0); - DataModel::Nullable progressPercent; - DataModel::Nullable platformCode; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatPresent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace BatPresent +namespace ActiveBatFaults { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DownloadError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OtaSoftwareUpdateRequestor::Id; } - - uint32_t softwareVersion = static_cast(0); - uint64_t bytesDownloaded = static_cast(0); - DataModel::Nullable progressPercent; - DataModel::Nullable platformCode; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatFaults::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DownloadError -} // namespace Events -} // namespace OtaSoftwareUpdateRequestor -namespace LocalizationConfiguration { - -namespace Attributes { - -namespace ActiveLocale { +} // namespace ActiveBatFaults +namespace BatReplacementDescription { struct TypeInfo { using Type = chip::CharSpan; using DecodableType = chip::CharSpan; using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveLocale::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatReplacementDescription::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 35; } + static constexpr size_t MaxLength() { return 60; } }; -} // namespace ActiveLocale -namespace SupportedLocales { +} // namespace BatReplacementDescription +namespace BatCommonDesignation { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedLocales::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatCommonDesignation::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedLocales -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace BatCommonDesignation +namespace BatANSIDesignation { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatANSIDesignation::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 20; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace BatANSIDesignation +namespace BatIECDesignation { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatIECDesignation::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 20; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +} // namespace BatIECDesignation +namespace BatApprovedChemistry { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + using Type = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatApprovedChemistry::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace BatApprovedChemistry +namespace BatCapacity { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatCapacity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace BatCapacity +namespace BatQuantity { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatQuantity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace BatQuantity +namespace BatChargeState { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } -}; -} // namespace ClusterRevision + using Type = chip::app::Clusters::PowerSource::BatChargeStateEnum; + using DecodableType = chip::app::Clusters::PowerSource::BatChargeStateEnum; + using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeStateEnum; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatChargeState +namespace BatTimeToFullCharge { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::LocalizationConfiguration::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - Attributes::ActiveLocale::TypeInfo::DecodableType activeLocale; - Attributes::SupportedLocales::TypeInfo::DecodableType supportedLocales; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatTimeToFullCharge::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace LocalizationConfiguration -namespace TimeFormatLocalization { - -namespace Attributes { +} // namespace BatTimeToFullCharge +namespace BatFunctionalWhileCharging { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; -namespace HourFormat { + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatFunctionalWhileCharging::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatFunctionalWhileCharging +namespace BatChargingCurrent { struct TypeInfo { - using Type = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; - using DecodableType = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; - using DecodableArgType = chip::app::Clusters::TimeFormatLocalization::HourFormatEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HourFormat::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatChargingCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace HourFormat -namespace ActiveCalendarType { +} // namespace BatChargingCurrent +namespace ActiveBatChargeFaults { struct TypeInfo { - using Type = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; - using DecodableType = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; - using DecodableArgType = chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveCalendarType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatChargeFaults::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveCalendarType -namespace SupportedCalendarTypes { +} // namespace ActiveBatChargeFaults +namespace EndpointList { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedCalendarTypes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndpointList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedCalendarTypes +} // namespace EndpointList namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } }; } // namespace ClusterRevision @@ -6095,15 +5688,49 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TimeFormatLocalization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::HourFormat::TypeInfo::DecodableType hourFormat = - static_cast(0); - Attributes::ActiveCalendarType::TypeInfo::DecodableType activeCalendarType = - static_cast(0); - Attributes::SupportedCalendarTypes::TypeInfo::DecodableType supportedCalendarTypes; + Attributes::Status::TypeInfo::DecodableType status = + static_cast(0); + Attributes::Order::TypeInfo::DecodableType order = static_cast(0); + Attributes::Description::TypeInfo::DecodableType description; + Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableType wiredAssessedInputVoltage; + Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableType wiredAssessedInputFrequency; + Attributes::WiredCurrentType::TypeInfo::DecodableType wiredCurrentType = + static_cast(0); + Attributes::WiredAssessedCurrent::TypeInfo::DecodableType wiredAssessedCurrent; + Attributes::WiredNominalVoltage::TypeInfo::DecodableType wiredNominalVoltage = static_cast(0); + Attributes::WiredMaximumCurrent::TypeInfo::DecodableType wiredMaximumCurrent = static_cast(0); + Attributes::WiredPresent::TypeInfo::DecodableType wiredPresent = static_cast(0); + Attributes::ActiveWiredFaults::TypeInfo::DecodableType activeWiredFaults; + Attributes::BatVoltage::TypeInfo::DecodableType batVoltage; + Attributes::BatPercentRemaining::TypeInfo::DecodableType batPercentRemaining; + Attributes::BatTimeRemaining::TypeInfo::DecodableType batTimeRemaining; + Attributes::BatChargeLevel::TypeInfo::DecodableType batChargeLevel = + static_cast(0); + Attributes::BatReplacementNeeded::TypeInfo::DecodableType batReplacementNeeded = static_cast(0); + Attributes::BatReplaceability::TypeInfo::DecodableType batReplaceability = + static_cast(0); + Attributes::BatPresent::TypeInfo::DecodableType batPresent = static_cast(0); + Attributes::ActiveBatFaults::TypeInfo::DecodableType activeBatFaults; + Attributes::BatReplacementDescription::TypeInfo::DecodableType batReplacementDescription; + Attributes::BatCommonDesignation::TypeInfo::DecodableType batCommonDesignation = + static_cast(0); + Attributes::BatANSIDesignation::TypeInfo::DecodableType batANSIDesignation; + Attributes::BatIECDesignation::TypeInfo::DecodableType batIECDesignation; + Attributes::BatApprovedChemistry::TypeInfo::DecodableType batApprovedChemistry = + static_cast(0); + Attributes::BatCapacity::TypeInfo::DecodableType batCapacity = static_cast(0); + Attributes::BatQuantity::TypeInfo::DecodableType batQuantity = static_cast(0); + Attributes::BatChargeState::TypeInfo::DecodableType batChargeState = + static_cast(0); + Attributes::BatTimeToFullCharge::TypeInfo::DecodableType batTimeToFullCharge; + Attributes::BatFunctionalWhileCharging::TypeInfo::DecodableType batFunctionalWhileCharging = static_cast(0); + Attributes::BatChargingCurrent::TypeInfo::DecodableType batChargingCurrent; + Attributes::ActiveBatChargeFaults::TypeInfo::DecodableType activeBatChargeFaults; + Attributes::EndpointList::TypeInfo::DecodableType endpointList; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -6113,155 +5740,82 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace TimeFormatLocalization -namespace UnitLocalization { +namespace Events { +namespace WiredFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Attributes { +enum class Fields : uint8_t +{ + kCurrent = 0, + kPrevious = 1, +}; -namespace TemperatureUnit { -struct TypeInfo +struct Type { - using Type = chip::app::Clusters::UnitLocalization::TempUnitEnum; - using DecodableType = chip::app::Clusters::UnitLocalization::TempUnitEnum; - using DecodableArgType = chip::app::Clusters::UnitLocalization::TempUnitEnum; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::WiredFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureUnit::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::List current; + DataModel::List previous; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace TemperatureUnit -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::WiredFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + + DataModel::DecodableList current; + DataModel::DecodableList previous; + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace WiredFaultChange +namespace BatFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } + kCurrent = 0, + kPrevious = 1, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::UnitLocalization::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::TemperatureUnit::TypeInfo::DecodableType temperatureUnit = - static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace UnitLocalization -namespace PowerSourceConfiguration { - -namespace Attributes { +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BatFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr bool kIsFabricScoped = false; -namespace Sources { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + DataModel::List current; + DataModel::List previous; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Sources::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Sources -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSourceConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BatFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + DataModel::DecodableList current; + DataModel::DecodableList previous; - Attributes::Sources::TypeInfo::DecodableType sources; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace PowerSourceConfiguration -namespace PowerSource { -namespace Structs { -namespace BatChargeFaultChangeType { +} // namespace BatFaultChange +namespace BatChargeFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { kCurrent = 0, @@ -6271,512 +5825,399 @@ enum class Fields : uint8_t struct Type { public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BatChargeFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr bool kIsFabricScoped = false; + DataModel::List current; DataModel::List previous; - static constexpr bool kIsFabricScoped = false; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BatChargeFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + DataModel::DecodableList current; DataModel::DecodableList previous; CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace BatChargeFaultChange +} // namespace Events +} // namespace PowerSource +namespace GeneralCommissioning { +namespace Structs { +namespace BasicCommissioningInfo { +enum class Fields : uint8_t +{ + kFailSafeExpiryLengthSeconds = 0, + kMaxCumulativeFailsafeSeconds = 1, +}; + +struct Type +{ +public: + uint16_t failSafeExpiryLengthSeconds = static_cast(0); + uint16_t maxCumulativeFailsafeSeconds = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace BatChargeFaultChangeType -namespace BatFaultChangeType { +using DecodableType = Type; + +} // namespace BasicCommissioningInfo +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ArmFailSafe { +struct Type; +struct DecodableType; +} // namespace ArmFailSafe + +namespace ArmFailSafeResponse { +struct Type; +struct DecodableType; +} // namespace ArmFailSafeResponse + +namespace SetRegulatoryConfig { +struct Type; +struct DecodableType; +} // namespace SetRegulatoryConfig + +namespace SetRegulatoryConfigResponse { +struct Type; +struct DecodableType; +} // namespace SetRegulatoryConfigResponse + +namespace CommissioningComplete { +struct Type; +struct DecodableType; +} // namespace CommissioningComplete + +namespace CommissioningCompleteResponse { +struct Type; +struct DecodableType; +} // namespace CommissioningCompleteResponse + +} // namespace Commands + +namespace Commands { +namespace ArmFailSafe { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kExpiryLengthSeconds = 0, + kBreadcrumb = 1, }; struct Type { public: - DataModel::List current; - DataModel::List previous; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr bool kIsFabricScoped = false; + uint16_t expiryLengthSeconds = static_cast(0); + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - DataModel::DecodableList current; - DataModel::DecodableList previous; + static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + uint16_t expiryLengthSeconds = static_cast(0); + uint64_t breadcrumb = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; }; - -} // namespace BatFaultChangeType -namespace WiredFaultChangeType { +}; // namespace ArmFailSafe +namespace ArmFailSafeResponse { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kErrorCode = 0, + kDebugText = 1, }; struct Type { public: - DataModel::List current; - DataModel::List previous; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr bool kIsFabricScoped = false; + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - DataModel::DecodableList current; - DataModel::DecodableList previous; + static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; +}; +}; // namespace ArmFailSafeResponse +namespace SetRegulatoryConfig { +enum class Fields : uint8_t +{ + kNewRegulatoryConfig = 0, + kCountryCode = 1, + kBreadcrumb = 2, }; -} // namespace WiredFaultChangeType -} // namespace Structs - -namespace Attributes { +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -namespace Status { -struct TypeInfo + RegulatoryLocationTypeEnum newRegulatoryConfig = static_cast(0); + chip::CharSpan countryCode; + uint64_t breadcrumb = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType { - using Type = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; - using DecodableType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::PowerSourceStatusEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Status::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + RegulatoryLocationTypeEnum newRegulatoryConfig = static_cast(0); + chip::CharSpan countryCode; + uint64_t breadcrumb = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Status -namespace Order { -struct TypeInfo +}; // namespace SetRegulatoryConfig +namespace SetRegulatoryConfigResponse { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + kErrorCode = 0, + kDebugText = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Order::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Order -namespace Description { -struct TypeInfo + +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 60; } + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Description -namespace WiredAssessedInputVoltage { -struct TypeInfo +}; // namespace SetRegulatoryConfigResponse +namespace CommissioningComplete { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedInputVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CommissioningComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace WiredAssessedInputVoltage -namespace WiredAssessedInputFrequency { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::CommissioningComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedInputFrequency::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace WiredAssessedInputFrequency -namespace WiredCurrentType { -struct TypeInfo +}; // namespace CommissioningComplete +namespace CommissioningCompleteResponse { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; - using DecodableType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::WiredCurrentTypeEnum; + kErrorCode = 0, + kDebugText = 1, +}; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredCurrentType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace WiredCurrentType -namespace WiredAssessedCurrent { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredAssessedCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CommissioningErrorEnum errorCode = static_cast(0); + chip::CharSpan debugText; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace WiredAssessedCurrent -namespace WiredNominalVoltage { +}; // namespace CommissioningCompleteResponse +} // namespace Commands + +namespace Attributes { + +namespace Breadcrumb { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredNominalVoltage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Breadcrumb::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace WiredNominalVoltage -namespace WiredMaximumCurrent { +} // namespace Breadcrumb +namespace BasicCommissioningInfo { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::Type; + using DecodableType = chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType; + using DecodableArgType = const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredMaximumCurrent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BasicCommissioningInfo::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace WiredMaximumCurrent -namespace WiredPresent { +} // namespace BasicCommissioningInfo +namespace RegulatoryConfig { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; + using DecodableType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; + using DecodableArgType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiredPresent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RegulatoryConfig::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace WiredPresent -namespace ActiveWiredFaults { +} // namespace RegulatoryConfig +namespace LocationCapability { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; + using DecodableType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; + using DecodableArgType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveWiredFaults::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocationCapability::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveWiredFaults -namespace BatVoltage { +} // namespace LocationCapability +namespace SupportsConcurrentConnection { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatVoltage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportsConcurrentConnection::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BatVoltage -namespace BatPercentRemaining { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatPercentRemaining::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatPercentRemaining -namespace BatTimeRemaining { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatTimeRemaining::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatTimeRemaining -namespace BatChargeLevel { -struct TypeInfo -{ - using Type = chip::app::Clusters::PowerSource::BatChargeLevelEnum; - using DecodableType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeLevelEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatChargeLevel -namespace BatReplacementNeeded { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatReplacementNeeded::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatReplacementNeeded -namespace BatReplaceability { -struct TypeInfo -{ - using Type = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; - using DecodableType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::BatReplaceabilityEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatReplaceability::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatReplaceability -namespace BatPresent { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatPresent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatPresent -namespace ActiveBatFaults { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatFaults::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveBatFaults -namespace BatReplacementDescription { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatReplacementDescription::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 60; } -}; -} // namespace BatReplacementDescription -namespace BatCommonDesignation { -struct TypeInfo -{ - using Type = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; - using DecodableType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::BatCommonDesignationEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatCommonDesignation::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatCommonDesignation -namespace BatANSIDesignation { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatANSIDesignation::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 20; } -}; -} // namespace BatANSIDesignation -namespace BatIECDesignation { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatIECDesignation::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 20; } -}; -} // namespace BatIECDesignation -namespace BatApprovedChemistry { -struct TypeInfo -{ - using Type = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; - using DecodableType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::BatApprovedChemistryEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatApprovedChemistry::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatApprovedChemistry -namespace BatCapacity { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatCapacity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatCapacity -namespace BatQuantity { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatQuantity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatQuantity -namespace BatChargeState { -struct TypeInfo -{ - using Type = chip::app::Clusters::PowerSource::BatChargeStateEnum; - using DecodableType = chip::app::Clusters::PowerSource::BatChargeStateEnum; - using DecodableArgType = chip::app::Clusters::PowerSource::BatChargeStateEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatChargeState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatChargeState -namespace BatTimeToFullCharge { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatTimeToFullCharge::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatTimeToFullCharge -namespace BatFunctionalWhileCharging { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatFunctionalWhileCharging::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatFunctionalWhileCharging -namespace BatChargingCurrent { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatChargingCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatChargingCurrent -namespace ActiveBatChargeFaults { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveBatChargeFaults::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveBatChargeFaults -namespace EndpointList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EndpointList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace EndpointList +} // namespace SupportsConcurrentConnection namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } }; } // namespace ClusterRevision @@ -6784,49 +6225,17 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Status::TypeInfo::DecodableType status = - static_cast(0); - Attributes::Order::TypeInfo::DecodableType order = static_cast(0); - Attributes::Description::TypeInfo::DecodableType description; - Attributes::WiredAssessedInputVoltage::TypeInfo::DecodableType wiredAssessedInputVoltage; - Attributes::WiredAssessedInputFrequency::TypeInfo::DecodableType wiredAssessedInputFrequency; - Attributes::WiredCurrentType::TypeInfo::DecodableType wiredCurrentType = - static_cast(0); - Attributes::WiredAssessedCurrent::TypeInfo::DecodableType wiredAssessedCurrent; - Attributes::WiredNominalVoltage::TypeInfo::DecodableType wiredNominalVoltage = static_cast(0); - Attributes::WiredMaximumCurrent::TypeInfo::DecodableType wiredMaximumCurrent = static_cast(0); - Attributes::WiredPresent::TypeInfo::DecodableType wiredPresent = static_cast(0); - Attributes::ActiveWiredFaults::TypeInfo::DecodableType activeWiredFaults; - Attributes::BatVoltage::TypeInfo::DecodableType batVoltage; - Attributes::BatPercentRemaining::TypeInfo::DecodableType batPercentRemaining; - Attributes::BatTimeRemaining::TypeInfo::DecodableType batTimeRemaining; - Attributes::BatChargeLevel::TypeInfo::DecodableType batChargeLevel = - static_cast(0); - Attributes::BatReplacementNeeded::TypeInfo::DecodableType batReplacementNeeded = static_cast(0); - Attributes::BatReplaceability::TypeInfo::DecodableType batReplaceability = - static_cast(0); - Attributes::BatPresent::TypeInfo::DecodableType batPresent = static_cast(0); - Attributes::ActiveBatFaults::TypeInfo::DecodableType activeBatFaults; - Attributes::BatReplacementDescription::TypeInfo::DecodableType batReplacementDescription; - Attributes::BatCommonDesignation::TypeInfo::DecodableType batCommonDesignation = - static_cast(0); - Attributes::BatANSIDesignation::TypeInfo::DecodableType batANSIDesignation; - Attributes::BatIECDesignation::TypeInfo::DecodableType batIECDesignation; - Attributes::BatApprovedChemistry::TypeInfo::DecodableType batApprovedChemistry = - static_cast(0); - Attributes::BatCapacity::TypeInfo::DecodableType batCapacity = static_cast(0); - Attributes::BatQuantity::TypeInfo::DecodableType batQuantity = static_cast(0); - Attributes::BatChargeState::TypeInfo::DecodableType batChargeState = - static_cast(0); - Attributes::BatTimeToFullCharge::TypeInfo::DecodableType batTimeToFullCharge; - Attributes::BatFunctionalWhileCharging::TypeInfo::DecodableType batFunctionalWhileCharging = static_cast(0); - Attributes::BatChargingCurrent::TypeInfo::DecodableType batChargingCurrent; - Attributes::ActiveBatChargeFaults::TypeInfo::DecodableType activeBatChargeFaults; - Attributes::EndpointList::TypeInfo::DecodableType endpointList; + Attributes::Breadcrumb::TypeInfo::DecodableType breadcrumb = static_cast(0); + Attributes::BasicCommissioningInfo::TypeInfo::DecodableType basicCommissioningInfo; + Attributes::RegulatoryConfig::TypeInfo::DecodableType regulatoryConfig = + static_cast(0); + Attributes::LocationCapability::TypeInfo::DecodableType locationCapability = + static_cast(0); + Attributes::SupportsConcurrentConnection::TypeInfo::DecodableType supportsConcurrentConnection = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -6836,131 +6245,91 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace WiredFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +namespace Structs { +namespace NetworkInfoStruct { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kNetworkID = 0, + kConnected = 1, + kNetworkIdentifier = 2, + kClientIdentifier = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::WiredFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr bool kIsFabricScoped = false; - - DataModel::List current; - DataModel::List previous; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::WiredFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - - DataModel::DecodableList current; - DataModel::DecodableList previous; + chip::ByteSpan networkID; + bool connected = static_cast(0); + Optional> networkIdentifier; + Optional> clientIdentifier; CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace WiredFaultChange -namespace BatFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -enum class Fields : uint8_t -{ - kCurrent = 0, - kPrevious = 1, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BatFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BatFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - - DataModel::DecodableList current; - DataModel::DecodableList previous; - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace BatFaultChange -namespace BatChargeFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +using DecodableType = Type; +} // namespace NetworkInfoStruct +namespace ThreadInterfaceScanResultStruct { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kPanId = 0, + kExtendedPanId = 1, + kNetworkName = 2, + kChannel = 3, + kVersion = 4, + kExtendedAddress = 5, + kRssi = 6, + kLqi = 7, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BatChargeFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - static constexpr bool kIsFabricScoped = false; + uint16_t panId = static_cast(0); + uint64_t extendedPanId = static_cast(0); + chip::CharSpan networkName; + uint16_t channel = static_cast(0); + uint8_t version = static_cast(0); + chip::ByteSpan extendedAddress; + int8_t rssi = static_cast(0); + uint8_t lqi = static_cast(0); - DataModel::List current; - DataModel::List previous; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BatChargeFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PowerSource::Id; } - - DataModel::DecodableList current; - DataModel::DecodableList previous; +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace BatChargeFaultChange -} // namespace Events -} // namespace PowerSource -namespace GeneralCommissioning { -namespace Structs { -namespace BasicCommissioningInfo { +} // namespace ThreadInterfaceScanResultStruct +namespace WiFiInterfaceScanResultStruct { enum class Fields : uint8_t { - kFailSafeExpiryLengthSeconds = 0, - kMaxCumulativeFailsafeSeconds = 1, + kSecurity = 0, + kSsid = 1, + kBssid = 2, + kChannel = 3, + kWiFiBand = 4, + kRssi = 5, }; struct Type { public: - uint16_t failSafeExpiryLengthSeconds = static_cast(0); - uint16_t maxCumulativeFailsafeSeconds = static_cast(0); + chip::BitMask security = static_cast>(0); + chip::ByteSpan ssid; + chip::ByteSpan bssid; + uint16_t channel = static_cast(0); + WiFiBandEnum wiFiBand = static_cast(0); + int8_t rssi = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -6971,65 +6340,90 @@ struct Type using DecodableType = Type; -} // namespace BasicCommissioningInfo +} // namespace WiFiInterfaceScanResultStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace ArmFailSafe { +namespace ScanNetworks { struct Type; struct DecodableType; -} // namespace ArmFailSafe +} // namespace ScanNetworks -namespace ArmFailSafeResponse { +namespace ScanNetworksResponse { struct Type; struct DecodableType; -} // namespace ArmFailSafeResponse +} // namespace ScanNetworksResponse -namespace SetRegulatoryConfig { +namespace AddOrUpdateWiFiNetwork { struct Type; struct DecodableType; -} // namespace SetRegulatoryConfig +} // namespace AddOrUpdateWiFiNetwork -namespace SetRegulatoryConfigResponse { +namespace AddOrUpdateThreadNetwork { struct Type; struct DecodableType; -} // namespace SetRegulatoryConfigResponse +} // namespace AddOrUpdateThreadNetwork -namespace CommissioningComplete { +namespace RemoveNetwork { struct Type; struct DecodableType; -} // namespace CommissioningComplete +} // namespace RemoveNetwork -namespace CommissioningCompleteResponse { +namespace NetworkConfigResponse { struct Type; struct DecodableType; -} // namespace CommissioningCompleteResponse +} // namespace NetworkConfigResponse + +namespace ConnectNetwork { +struct Type; +struct DecodableType; +} // namespace ConnectNetwork + +namespace ConnectNetworkResponse { +struct Type; +struct DecodableType; +} // namespace ConnectNetworkResponse + +namespace ReorderNetwork { +struct Type; +struct DecodableType; +} // namespace ReorderNetwork + +namespace QueryIdentity { +struct Type; +struct DecodableType; +} // namespace QueryIdentity + +namespace QueryIdentityResponse { +struct Type; +struct DecodableType; +} // namespace QueryIdentityResponse } // namespace Commands namespace Commands { -namespace ArmFailSafe { +namespace ScanNetworks { enum class Fields : uint8_t { - kExpiryLengthSeconds = 0, - kBreadcrumb = 1, + kSsid = 0, + kBreadcrumb = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::ScanNetworks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - uint16_t expiryLengthSeconds = static_cast(0); - uint64_t breadcrumb = static_cast(0); + Optional> ssid; + Optional breadcrumb; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType; + using ResponseType = Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7037,30 +6431,34 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ArmFailSafe::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::ScanNetworks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - uint16_t expiryLengthSeconds = static_cast(0); - uint64_t breadcrumb = static_cast(0); + Optional> ssid; + Optional breadcrumb; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ArmFailSafe -namespace ArmFailSafeResponse { +}; // namespace ScanNetworks +namespace ScanNetworksResponse { enum class Fields : uint8_t { - kErrorCode = 0, - kDebugText = 1, + kNetworkingStatus = 0, + kDebugText = 1, + kWiFiScanResults = 2, + kThreadScanResults = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + Optional> wiFiScanResults; + Optional> threadScanResults; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7072,36 +6470,44 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ArmFailSafeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + Optional> wiFiScanResults; + Optional> threadScanResults; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ArmFailSafeResponse -namespace SetRegulatoryConfig { +}; // namespace ScanNetworksResponse +namespace AddOrUpdateWiFiNetwork { enum class Fields : uint8_t { - kNewRegulatoryConfig = 0, - kCountryCode = 1, - kBreadcrumb = 2, + kSsid = 0, + kCredentials = 1, + kBreadcrumb = 2, + kNetworkIdentity = 3, + kClientIdentifier = 4, + kPossessionNonce = 5, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateWiFiNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - RegulatoryLocationTypeEnum newRegulatoryConfig = static_cast(0); - chip::CharSpan countryCode; - uint64_t breadcrumb = static_cast(0); + chip::ByteSpan ssid; + chip::ByteSpan credentials; + Optional breadcrumb; + Optional networkIdentity; + Optional clientIdentifier; + Optional possessionNonce; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; + using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7109,35 +6515,38 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfig::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateWiFiNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - RegulatoryLocationTypeEnum newRegulatoryConfig = static_cast(0); - chip::CharSpan countryCode; - uint64_t breadcrumb = static_cast(0); + chip::ByteSpan ssid; + chip::ByteSpan credentials; + Optional breadcrumb; + Optional networkIdentity; + Optional clientIdentifier; + Optional possessionNonce; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetRegulatoryConfig -namespace SetRegulatoryConfigResponse { +}; // namespace AddOrUpdateWiFiNetwork +namespace AddOrUpdateThreadNetwork { enum class Fields : uint8_t { - kErrorCode = 0, - kDebugText = 1, + kOperationalDataset = 0, + kBreadcrumb = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateThreadNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + chip::ByteSpan operationalDataset; + Optional breadcrumb; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7145,29 +6554,34 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetRegulatoryConfigResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateThreadNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + chip::ByteSpan operationalDataset; + Optional breadcrumb; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetRegulatoryConfigResponse -namespace CommissioningComplete { +}; // namespace AddOrUpdateThreadNetwork +namespace RemoveNetwork { enum class Fields : uint8_t { + kNetworkID = 0, + kBreadcrumb = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CommissioningComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + + chip::ByteSpan networkID; + Optional breadcrumb; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType; + using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7175,28 +6589,36 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::CommissioningComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + chip::ByteSpan networkID; + Optional breadcrumb; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CommissioningComplete -namespace CommissioningCompleteResponse { +}; // namespace RemoveNetwork +namespace NetworkConfigResponse { enum class Fields : uint8_t { - kErrorCode = 0, - kDebugText = 1, + kNetworkingStatus = 0, + kDebugText = 1, + kNetworkIndex = 2, + kClientIdentity = 3, + kPossessionSignature = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + Optional networkIndex; + Optional clientIdentity; + Optional possessionSignature; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7208,318 +6630,183 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::CommissioningCompleteResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - CommissioningErrorEnum errorCode = static_cast(0); - chip::CharSpan debugText; + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + Optional networkIndex; + Optional clientIdentity; + Optional possessionSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CommissioningCompleteResponse -} // namespace Commands - -namespace Attributes { +}; // namespace NetworkConfigResponse +namespace ConnectNetwork { +enum class Fields : uint8_t +{ + kNetworkID = 0, + kBreadcrumb = 1, +}; -namespace Breadcrumb { -struct TypeInfo +struct Type { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ConnectNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Breadcrumb::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::ByteSpan networkID; + Optional breadcrumb; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Breadcrumb -namespace BasicCommissioningInfo { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::Type; - using DecodableType = chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType; - using DecodableArgType = const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &; +public: + static constexpr CommandId GetCommandId() { return Commands::ConnectNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BasicCommissioningInfo::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::ByteSpan networkID; + Optional breadcrumb; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BasicCommissioningInfo -namespace RegulatoryConfig { -struct TypeInfo +}; // namespace ConnectNetwork +namespace ConnectNetworkResponse { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - using DecodableType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - using DecodableArgType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RegulatoryConfig::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kNetworkingStatus = 0, + kDebugText = 1, + kErrorValue = 2, }; -} // namespace RegulatoryConfig -namespace LocationCapability { -struct TypeInfo + +struct Type { - using Type = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - using DecodableType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; - using DecodableArgType = chip::app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocationCapability::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + DataModel::Nullable errorValue; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace LocationCapability -namespace SupportsConcurrentConnection { -struct TypeInfo + +struct DecodableType { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; +public: + static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportsConcurrentConnection::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportsConcurrentConnection -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::Breadcrumb::TypeInfo::DecodableType breadcrumb = static_cast(0); - Attributes::BasicCommissioningInfo::TypeInfo::DecodableType basicCommissioningInfo; - Attributes::RegulatoryConfig::TypeInfo::DecodableType regulatoryConfig = - static_cast(0); - Attributes::LocationCapability::TypeInfo::DecodableType locationCapability = - static_cast(0); - Attributes::SupportsConcurrentConnection::TypeInfo::DecodableType supportsConcurrentConnection = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + NetworkCommissioningStatusEnum networkingStatus = static_cast(0); + Optional debugText; + DataModel::Nullable errorValue; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace GeneralCommissioning -namespace NetworkCommissioning { -namespace Structs { -namespace NetworkInfoStruct { +}; // namespace ConnectNetworkResponse +namespace ReorderNetwork { enum class Fields : uint8_t { - kNetworkID = 0, - kConnected = 1, - kNetworkIdentifier = 2, - kClientIdentifier = 3, + kNetworkID = 0, + kNetworkIndex = 1, + kBreadcrumb = 2, }; struct Type { public: - chip::ByteSpan networkID; - bool connected = static_cast(0); - Optional> networkIdentifier; - Optional> clientIdentifier; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ReorderNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan networkID; + uint8_t networkIndex = static_cast(0); + Optional breadcrumb; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; -using DecodableType = Type; + using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; -} // namespace NetworkInfoStruct -namespace ThreadInterfaceScanResultStruct { -enum class Fields : uint8_t -{ - kPanId = 0, - kExtendedPanId = 1, - kNetworkName = 2, - kChannel = 3, - kVersion = 4, - kExtendedAddress = 5, - kRssi = 6, - kLqi = 7, + static constexpr bool MustUseTimedInvoke() { return false; } }; -struct Type +struct DecodableType { public: - uint16_t panId = static_cast(0); - uint64_t extendedPanId = static_cast(0); - chip::CharSpan networkName; - uint16_t channel = static_cast(0); - uint8_t version = static_cast(0); - chip::ByteSpan extendedAddress; - int8_t rssi = static_cast(0); - uint8_t lqi = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::ReorderNetwork::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + chip::ByteSpan networkID; + uint8_t networkIndex = static_cast(0); + Optional breadcrumb; CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; - -using DecodableType = Type; - -} // namespace ThreadInterfaceScanResultStruct -namespace WiFiInterfaceScanResultStruct { +}; // namespace ReorderNetwork +namespace QueryIdentity { enum class Fields : uint8_t { - kSecurity = 0, - kSsid = 1, - kBssid = 2, - kChannel = 3, - kWiFiBand = 4, - kRssi = 5, + kKeyIdentifier = 0, + kPossessionNonce = 1, }; struct Type { public: - chip::BitMask security = static_cast>(0); - chip::ByteSpan ssid; - chip::ByteSpan bssid; - uint16_t channel = static_cast(0); - WiFiBandEnum wiFiBand = static_cast(0); - int8_t rssi = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan keyIdentifier; + Optional possessionNonce; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace WiFiInterfaceScanResultStruct -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ScanNetworks { -struct Type; -struct DecodableType; -} // namespace ScanNetworks - -namespace ScanNetworksResponse { -struct Type; -struct DecodableType; -} // namespace ScanNetworksResponse - -namespace AddOrUpdateWiFiNetwork { -struct Type; -struct DecodableType; -} // namespace AddOrUpdateWiFiNetwork - -namespace AddOrUpdateThreadNetwork { -struct Type; -struct DecodableType; -} // namespace AddOrUpdateThreadNetwork - -namespace RemoveNetwork { -struct Type; -struct DecodableType; -} // namespace RemoveNetwork - -namespace NetworkConfigResponse { -struct Type; -struct DecodableType; -} // namespace NetworkConfigResponse - -namespace ConnectNetwork { -struct Type; -struct DecodableType; -} // namespace ConnectNetwork -namespace ConnectNetworkResponse { -struct Type; -struct DecodableType; -} // namespace ConnectNetworkResponse + using ResponseType = Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; -namespace ReorderNetwork { -struct Type; -struct DecodableType; -} // namespace ReorderNetwork + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace QueryIdentity { -struct Type; -struct DecodableType; -} // namespace QueryIdentity +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + chip::ByteSpan keyIdentifier; + Optional possessionNonce; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace QueryIdentity namespace QueryIdentityResponse { -struct Type; -struct DecodableType; -} // namespace QueryIdentityResponse - -} // namespace Commands - -namespace Commands { -namespace ScanNetworks { enum class Fields : uint8_t { - kSsid = 0, - kBreadcrumb = 1, + kIdentity = 0, + kPossessionSignature = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ScanNetworks::Id; } + static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - Optional> ssid; - Optional breadcrumb; + chip::ByteSpan identity; + Optional possessionSignature; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7527,236 +6814,261 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ScanNetworks::Id; } + static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - Optional> ssid; - Optional breadcrumb; + chip::ByteSpan identity; + Optional possessionSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ScanNetworks -namespace ScanNetworksResponse { -enum class Fields : uint8_t -{ - kNetworkingStatus = 0, - kDebugText = 1, - kWiFiScanResults = 2, - kThreadScanResults = 3, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - Optional> wiFiScanResults; - Optional> threadScanResults; +}; // namespace QueryIdentityResponse +} // namespace Commands - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = DataModel::NullObjectType; +namespace MaxNetworks { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxNetworks::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace MaxNetworks +namespace Networks { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ScanNetworksResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> &; - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - Optional> wiFiScanResults; - Optional> threadScanResults; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Networks::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ScanNetworksResponse -namespace AddOrUpdateWiFiNetwork { -enum class Fields : uint8_t +} // namespace Networks +namespace ScanMaxTimeSeconds { +struct TypeInfo { - kSsid = 0, - kCredentials = 1, - kBreadcrumb = 2, - kNetworkIdentity = 3, - kClientIdentifier = 4, - kPossessionNonce = 5, -}; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScanMaxTimeSeconds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ScanMaxTimeSeconds +namespace ConnectMaxTimeSeconds { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateWiFiNetwork::Id; } + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ConnectMaxTimeSeconds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ConnectMaxTimeSeconds +namespace InterfaceEnabled { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - chip::ByteSpan ssid; - chip::ByteSpan credentials; - Optional breadcrumb; - Optional networkIdentity; - Optional clientIdentifier; - Optional possessionNonce; + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InterfaceEnabled::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InterfaceEnabled +namespace LastNetworkingStatus { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LastNetworkingStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LastNetworkingStatus +namespace LastNetworkID { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LastNetworkID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace LastNetworkID +namespace LastConnectErrorValue { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LastConnectErrorValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace LastConnectErrorValue +namespace SupportedWiFiBands { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedWiFiBands::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedWiFiBands +namespace SupportedThreadFeatures { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateWiFiNetwork::Id; } + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedThreadFeatures::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedThreadFeatures +namespace ThreadVersion { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - chip::ByteSpan ssid; - chip::ByteSpan credentials; - Optional breadcrumb; - Optional networkIdentity; - Optional clientIdentifier; - Optional possessionNonce; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ThreadVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace AddOrUpdateWiFiNetwork -namespace AddOrUpdateThreadNetwork { -enum class Fields : uint8_t +} // namespace ThreadVersion +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kOperationalDataset = 0, - kBreadcrumb = 1, + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateThreadNetwork::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - chip::ByteSpan operationalDataset; - Optional breadcrumb; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::AddOrUpdateThreadNetwork::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - chip::ByteSpan operationalDataset; - Optional breadcrumb; - CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddOrUpdateThreadNetwork -namespace RemoveNetwork { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kNetworkID = 0, - kBreadcrumb = 1, + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } }; - -struct Type +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveNetwork::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - chip::ByteSpan networkID; - Optional breadcrumb; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; - -struct DecodableType +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RemoveNetwork::Id; } static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - chip::ByteSpan networkID; - Optional breadcrumb; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace RemoveNetwork -namespace NetworkConfigResponse { -enum class Fields : uint8_t -{ - kNetworkingStatus = 0, - kDebugText = 1, - kNetworkIndex = 2, - kClientIdentity = 3, - kPossessionSignature = 4, }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - Optional networkIndex; - Optional clientIdentity; - Optional possessionSignature; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::MaxNetworks::TypeInfo::DecodableType maxNetworks = static_cast(0); + Attributes::Networks::TypeInfo::DecodableType networks; + Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds = static_cast(0); + Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType connectMaxTimeSeconds = static_cast(0); + Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled = static_cast(0); + Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus; + Attributes::LastNetworkID::TypeInfo::DecodableType lastNetworkID; + Attributes::LastConnectErrorValue::TypeInfo::DecodableType lastConnectErrorValue; + Attributes::SupportedWiFiBands::TypeInfo::DecodableType supportedWiFiBands; + Attributes::SupportedThreadFeatures::TypeInfo::DecodableType supportedThreadFeatures = + static_cast>(0); + Attributes::ThreadVersion::TypeInfo::DecodableType threadVersion = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace NetworkCommissioning +namespace DiagnosticLogs { - using ResponseType = DataModel::NullObjectType; +namespace Commands { +// Forward-declarations so we can reference these later. - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace RetrieveLogsRequest { +struct Type; +struct DecodableType; +} // namespace RetrieveLogsRequest -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::NetworkConfigResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } +namespace RetrieveLogsResponse { +struct Type; +struct DecodableType; +} // namespace RetrieveLogsResponse - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - Optional networkIndex; - Optional clientIdentity; - Optional possessionSignature; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace NetworkConfigResponse -namespace ConnectNetwork { +} // namespace Commands + +namespace Commands { +namespace RetrieveLogsRequest { enum class Fields : uint8_t { - kNetworkID = 0, - kBreadcrumb = 1, + kIntent = 0, + kRequestedProtocol = 1, + kTransferFileDesignator = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ConnectNetwork::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - chip::ByteSpan networkID; - Optional breadcrumb; + IntentEnum intent = static_cast(0); + TransferProtocolEnum requestedProtocol = static_cast(0); + Optional transferFileDesignator; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; + using ResponseType = Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -7764,32 +7076,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ConnectNetwork::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - chip::ByteSpan networkID; - Optional breadcrumb; + IntentEnum intent = static_cast(0); + TransferProtocolEnum requestedProtocol = static_cast(0); + Optional transferFileDesignator; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ConnectNetwork -namespace ConnectNetworkResponse { +}; // namespace RetrieveLogsRequest +namespace RetrieveLogsResponse { enum class Fields : uint8_t { - kNetworkingStatus = 0, - kDebugText = 1, - kErrorValue = 2, + kStatus = 0, + kLogContent = 1, + kUTCTimeStamp = 2, + kTimeSinceBoot = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - DataModel::Nullable errorValue; + StatusEnum status = static_cast(0); + chip::ByteSpan logContent; + Optional UTCTimeStamp; + Optional timeSinceBoot; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7801,104 +7116,164 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ConnectNetworkResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - NetworkCommissioningStatusEnum networkingStatus = static_cast(0); - Optional debugText; - DataModel::Nullable errorValue; + StatusEnum status = static_cast(0); + chip::ByteSpan logContent; + Optional UTCTimeStamp; + Optional timeSinceBoot; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ConnectNetworkResponse -namespace ReorderNetwork { -enum class Fields : uint8_t +}; // namespace RetrieveLogsResponse +} // namespace Commands + +namespace Attributes { + +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kNetworkID = 0, - kNetworkIndex = 1, - kBreadcrumb = 2, + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ReorderNetwork::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - - chip::ByteSpan networkID; - uint8_t networkIndex = static_cast(0); - Optional breadcrumb; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ReorderNetwork::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - chip::ByteSpan networkID; - uint8_t networkIndex = static_cast(0); - Optional breadcrumb; - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -}; // namespace ReorderNetwork -namespace QueryIdentity { +} // namespace Attributes +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { +namespace Structs { +namespace NetworkInterface { enum class Fields : uint8_t { - kKeyIdentifier = 0, - kPossessionNonce = 1, + kName = 0, + kIsOperational = 1, + kOffPremiseServicesReachableIPv4 = 2, + kOffPremiseServicesReachableIPv6 = 3, + kHardwareAddress = 4, + kIPv4Addresses = 5, + kIPv6Addresses = 6, + kType = 7, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + chip::CharSpan name; + bool isOperational = static_cast(0); + DataModel::Nullable offPremiseServicesReachableIPv4; + DataModel::Nullable offPremiseServicesReachableIPv6; + chip::ByteSpan hardwareAddress; + DataModel::List IPv4Addresses; + DataModel::List IPv6Addresses; + InterfaceTypeEnum type = static_cast(0); - chip::ByteSpan keyIdentifier; - Optional possessionNonce; + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::QueryIdentity::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + chip::CharSpan name; + bool isOperational = static_cast(0); + DataModel::Nullable offPremiseServicesReachableIPv4; + DataModel::Nullable offPremiseServicesReachableIPv6; + chip::ByteSpan hardwareAddress; + DataModel::DecodableList IPv4Addresses; + DataModel::DecodableList IPv6Addresses; + InterfaceTypeEnum type = static_cast(0); - chip::ByteSpan keyIdentifier; - Optional possessionNonce; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace QueryIdentity -namespace QueryIdentityResponse { + +} // namespace NetworkInterface +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace TestEventTrigger { +struct Type; +struct DecodableType; +} // namespace TestEventTrigger + +namespace TimeSnapshot { +struct Type; +struct DecodableType; +} // namespace TimeSnapshot + +namespace TimeSnapshotResponse { +struct Type; +struct DecodableType; +} // namespace TimeSnapshotResponse + +} // namespace Commands + +namespace Commands { +namespace TestEventTrigger { enum class Fields : uint8_t { - kIdentity = 0, - kPossessionSignature = 1, + kEnableKey = 0, + kEventTrigger = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - chip::ByteSpan identity; - Optional possessionSignature; + chip::ByteSpan enableKey; + uint64_t eventTrigger = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -7910,188 +7285,226 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::QueryIdentityResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - chip::ByteSpan identity; - Optional possessionSignature; + chip::ByteSpan enableKey; + uint64_t eventTrigger = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace QueryIdentityResponse +}; // namespace TestEventTrigger +namespace TimeSnapshot { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace TimeSnapshot +namespace TimeSnapshotResponse { +enum class Fields : uint8_t +{ + kSystemTimeMs = 0, + kPosixTimeMs = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + uint64_t systemTimeMs = static_cast(0); + DataModel::Nullable posixTimeMs; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + uint64_t systemTimeMs = static_cast(0); + DataModel::Nullable posixTimeMs; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace TimeSnapshotResponse } // namespace Commands namespace Attributes { -namespace MaxNetworks { +namespace NetworkInterfaces { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterface::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxNetworks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NetworkInterfaces::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxNetworks -namespace Networks { +} // namespace NetworkInterfaces +namespace RebootCount { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::NetworkCommissioning::Structs::NetworkInfoStruct::DecodableType> &; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Networks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RebootCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Networks -namespace ScanMaxTimeSeconds { +} // namespace RebootCount +namespace UpTime { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ScanMaxTimeSeconds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UpTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ScanMaxTimeSeconds -namespace ConnectMaxTimeSeconds { +} // namespace UpTime +namespace TotalOperationalHours { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ConnectMaxTimeSeconds::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TotalOperationalHours::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ConnectMaxTimeSeconds -namespace InterfaceEnabled { +} // namespace TotalOperationalHours +namespace BootReason { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; + using DecodableType = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; + using DecodableArgType = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InterfaceEnabled::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BootReason::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InterfaceEnabled -namespace LastNetworkingStatus { +} // namespace BootReason +namespace ActiveHardwareFaults { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::Nullable &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LastNetworkingStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveHardwareFaults::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LastNetworkingStatus -namespace LastNetworkID { +} // namespace ActiveHardwareFaults +namespace ActiveRadioFaults { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LastNetworkID::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveRadioFaults::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } }; -} // namespace LastNetworkID -namespace LastConnectErrorValue { +} // namespace ActiveRadioFaults +namespace ActiveNetworkFaults { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LastConnectErrorValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveNetworkFaults::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LastConnectErrorValue -namespace SupportedWiFiBands { +} // namespace ActiveNetworkFaults +namespace TestEventTriggersEnabled { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedWiFiBands::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TestEventTriggersEnabled::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedWiFiBands -namespace SupportedThreadFeatures { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedThreadFeatures::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportedThreadFeatures -namespace ThreadVersion { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ThreadVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ThreadVersion +} // namespace TestEventTriggersEnabled namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } }; } // namespace ClusterRevision @@ -8099,22 +7512,20 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::NetworkCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxNetworks::TypeInfo::DecodableType maxNetworks = static_cast(0); - Attributes::Networks::TypeInfo::DecodableType networks; - Attributes::ScanMaxTimeSeconds::TypeInfo::DecodableType scanMaxTimeSeconds = static_cast(0); - Attributes::ConnectMaxTimeSeconds::TypeInfo::DecodableType connectMaxTimeSeconds = static_cast(0); - Attributes::InterfaceEnabled::TypeInfo::DecodableType interfaceEnabled = static_cast(0); - Attributes::LastNetworkingStatus::TypeInfo::DecodableType lastNetworkingStatus; - Attributes::LastNetworkID::TypeInfo::DecodableType lastNetworkID; - Attributes::LastConnectErrorValue::TypeInfo::DecodableType lastConnectErrorValue; - Attributes::SupportedWiFiBands::TypeInfo::DecodableType supportedWiFiBands; - Attributes::SupportedThreadFeatures::TypeInfo::DecodableType supportedThreadFeatures = - static_cast>(0); - Attributes::ThreadVersion::TypeInfo::DecodableType threadVersion = static_cast(0); + Attributes::NetworkInterfaces::TypeInfo::DecodableType networkInterfaces; + Attributes::RebootCount::TypeInfo::DecodableType rebootCount = static_cast(0); + Attributes::UpTime::TypeInfo::DecodableType upTime = static_cast(0); + Attributes::TotalOperationalHours::TypeInfo::DecodableType totalOperationalHours = static_cast(0); + Attributes::BootReason::TypeInfo::DecodableType bootReason = + static_cast(0); + Attributes::ActiveHardwareFaults::TypeInfo::DecodableType activeHardwareFaults; + Attributes::ActiveRadioFaults::TypeInfo::DecodableType activeRadioFaults; + Attributes::ActiveNetworkFaults::TypeInfo::DecodableType activeNetworkFaults; + Attributes::TestEventTriggersEnabled::TypeInfo::DecodableType testEventTriggersEnabled = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -8124,315 +7535,205 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace NetworkCommissioning -namespace DiagnosticLogs { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace RetrieveLogsRequest { -struct Type; -struct DecodableType; -} // namespace RetrieveLogsRequest - -namespace RetrieveLogsResponse { -struct Type; -struct DecodableType; -} // namespace RetrieveLogsResponse - -} // namespace Commands +namespace Events { +namespace HardwareFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Commands { -namespace RetrieveLogsRequest { enum class Fields : uint8_t { - kIntent = 0, - kRequestedProtocol = 1, - kTransferFileDesignator = 2, + kCurrent = 0, + kPrevious = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; - IntentEnum intent = static_cast(0); - TransferProtocolEnum requestedProtocol = static_cast(0); - Optional transferFileDesignator; + DataModel::List current; + DataModel::List previous; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + + DataModel::DecodableList current; + DataModel::DecodableList previous; - IntentEnum intent = static_cast(0); - TransferProtocolEnum requestedProtocol = static_cast(0); - Optional transferFileDesignator; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RetrieveLogsRequest -namespace RetrieveLogsResponse { +} // namespace HardwareFaultChange +namespace RadioFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + enum class Fields : uint8_t { - kStatus = 0, - kLogContent = 1, - kUTCTimeStamp = 2, - kTimeSinceBoot = 3, + kCurrent = 0, + kPrevious = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; - StatusEnum status = static_cast(0); - chip::ByteSpan logContent; - Optional UTCTimeStamp; - Optional timeSinceBoot; + DataModel::List current; + DataModel::List previous; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RetrieveLogsResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - - StatusEnum status = static_cast(0); - chip::ByteSpan logContent; - Optional UTCTimeStamp; - Optional timeSinceBoot; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace RetrieveLogsResponse -} // namespace Commands + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } -namespace Attributes { + DataModel::DecodableList current; + DataModel::DecodableList previous; -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::DiagnosticLogs::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +} // namespace RadioFaultChange +namespace NetworkFaultChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace DiagnosticLogs -namespace GeneralDiagnostics { -namespace Structs { -namespace NetworkInterface { enum class Fields : uint8_t { - kName = 0, - kIsOperational = 1, - kOffPremiseServicesReachableIPv4 = 2, - kOffPremiseServicesReachableIPv6 = 3, - kHardwareAddress = 4, - kIPv4Addresses = 5, - kIPv6Addresses = 6, - kType = 7, + kCurrent = 0, + kPrevious = 1, }; struct Type { public: - chip::CharSpan name; - bool isOperational = static_cast(0); - DataModel::Nullable offPremiseServicesReachableIPv4; - DataModel::Nullable offPremiseServicesReachableIPv6; - chip::ByteSpan hardwareAddress; - DataModel::List IPv4Addresses; - DataModel::List IPv6Addresses; - InterfaceTypeEnum type = static_cast(0); - + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } static constexpr bool kIsFabricScoped = false; + DataModel::List current; + DataModel::List previous; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - chip::CharSpan name; - bool isOperational = static_cast(0); - DataModel::Nullable offPremiseServicesReachableIPv4; - DataModel::Nullable offPremiseServicesReachableIPv6; - chip::ByteSpan hardwareAddress; - DataModel::DecodableList IPv4Addresses; - DataModel::DecodableList IPv6Addresses; - InterfaceTypeEnum type = static_cast(0); + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + DataModel::DecodableList current; + DataModel::DecodableList previous; - static constexpr bool kIsFabricScoped = false; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; +} // namespace NetworkFaultChange +namespace BootReason { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -} // namespace NetworkInterface -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace TestEventTrigger { -struct Type; -struct DecodableType; -} // namespace TestEventTrigger - -namespace TimeSnapshot { -struct Type; -struct DecodableType; -} // namespace TimeSnapshot - -namespace TimeSnapshotResponse { -struct Type; -struct DecodableType; -} // namespace TimeSnapshotResponse - -} // namespace Commands - -namespace Commands { -namespace TestEventTrigger { enum class Fields : uint8_t { - kEnableKey = 0, - kEventTrigger = 1, + kBootReason = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BootReason::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; - chip::ByteSpan enableKey; - uint64_t eventTrigger = static_cast(0); + BootReasonEnum bootReason = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::TestEventTrigger::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::BootReason::Id; } static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - chip::ByteSpan enableKey; - uint64_t eventTrigger = static_cast(0); + BootReasonEnum bootReason = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace TestEventTrigger -namespace TimeSnapshot { +} // namespace BootReason +} // namespace Events +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +namespace Structs { +namespace ThreadMetricsStruct { enum class Fields : uint8_t { + kId = 0, + kName = 1, + kStackFreeCurrent = 2, + kStackFreeMinimum = 3, + kStackSize = 4, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + uint64_t id = static_cast(0); + Optional name; + Optional stackFreeCurrent; + Optional stackFreeMinimum; + Optional stackSize; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::TimeSnapshot::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace TimeSnapshot -namespace TimeSnapshotResponse { +} // namespace ThreadMetricsStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ResetWatermarks { +struct Type; +struct DecodableType; +} // namespace ResetWatermarks + +} // namespace Commands + +namespace Commands { +namespace ResetWatermarks { enum class Fields : uint8_t { - kSystemTimeMs = 0, - kPosixTimeMs = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - - uint64_t systemTimeMs = static_cast(0); - DataModel::Nullable posixTimeMs; + static constexpr CommandId GetCommandId() { return Commands::ResetWatermarks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -8444,163 +7745,100 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::TimeSnapshotResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr CommandId GetCommandId() { return Commands::ResetWatermarks::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - uint64_t systemTimeMs = static_cast(0); - DataModel::Nullable posixTimeMs; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace TimeSnapshotResponse +}; // namespace ResetWatermarks } // namespace Commands namespace Attributes { -namespace NetworkInterfaces { +namespace ThreadMetrics { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; + chip::app::DataModel::DecodableList; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterface::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NetworkInterfaces::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NetworkInterfaces -namespace RebootCount { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RebootCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ThreadMetrics::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RebootCount -namespace UpTime { +} // namespace ThreadMetrics +namespace CurrentHeapFree { struct TypeInfo { using Type = uint64_t; using DecodableType = uint64_t; using DecodableArgType = uint64_t; - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UpTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace UpTime -namespace TotalOperationalHours { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TotalOperationalHours::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TotalOperationalHours -namespace BootReason { -struct TypeInfo -{ - using Type = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; - using DecodableType = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; - using DecodableArgType = chip::app::Clusters::GeneralDiagnostics::BootReasonEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BootReason::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BootReason -namespace ActiveHardwareFaults { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveHardwareFaults::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveHardwareFaults -namespace ActiveRadioFaults { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveRadioFaults::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapFree::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveRadioFaults -namespace ActiveNetworkFaults { +} // namespace CurrentHeapFree +namespace CurrentHeapUsed { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveNetworkFaults::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapUsed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveNetworkFaults -namespace TestEventTriggersEnabled { +} // namespace CurrentHeapUsed +namespace CurrentHeapHighWatermark { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TestEventTriggersEnabled::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapHighWatermark::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TestEventTriggersEnabled +} // namespace CurrentHeapHighWatermark namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } }; } // namespace ClusterRevision @@ -8608,20 +7846,14 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::NetworkInterfaces::TypeInfo::DecodableType networkInterfaces; - Attributes::RebootCount::TypeInfo::DecodableType rebootCount = static_cast(0); - Attributes::UpTime::TypeInfo::DecodableType upTime = static_cast(0); - Attributes::TotalOperationalHours::TypeInfo::DecodableType totalOperationalHours = static_cast(0); - Attributes::BootReason::TypeInfo::DecodableType bootReason = - static_cast(0); - Attributes::ActiveHardwareFaults::TypeInfo::DecodableType activeHardwareFaults; - Attributes::ActiveRadioFaults::TypeInfo::DecodableType activeRadioFaults; - Attributes::ActiveNetworkFaults::TypeInfo::DecodableType activeNetworkFaults; - Attributes::TestEventTriggersEnabled::TypeInfo::DecodableType testEventTriggersEnabled = static_cast(0); + Attributes::ThreadMetrics::TypeInfo::DecodableType threadMetrics; + Attributes::CurrentHeapFree::TypeInfo::DecodableType currentHeapFree = static_cast(0); + Attributes::CurrentHeapUsed::TypeInfo::DecodableType currentHeapUsed = static_cast(0); + Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableType currentHeapHighWatermark = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -8632,25 +7864,27 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace HardwareFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +namespace SoftwareFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kId = 0, + kName = 1, + kFaultRecording = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; + uint64_t id = static_cast(0); + Optional name; + Optional faultRecording; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -8659,142 +7893,161 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::HardwareFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - DataModel::DecodableList current; - DataModel::DecodableList previous; + uint64_t id = static_cast(0); + Optional name; + Optional faultRecording; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace HardwareFaultChange -namespace RadioFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +} // namespace SoftwareFault +} // namespace Events +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +namespace Structs { +namespace NeighborTableStruct { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kExtAddress = 0, + kAge = 1, + kRloc16 = 2, + kLinkFrameCounter = 3, + kMleFrameCounter = 4, + kLqi = 5, + kAverageRssi = 6, + kLastRssi = 7, + kFrameErrorRate = 8, + kMessageErrorRate = 9, + kRxOnWhenIdle = 10, + kFullThreadDevice = 11, + kFullNetworkData = 12, + kIsChild = 13, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr bool kIsFabricScoped = false; + uint64_t extAddress = static_cast(0); + uint32_t age = static_cast(0); + uint16_t rloc16 = static_cast(0); + uint32_t linkFrameCounter = static_cast(0); + uint32_t mleFrameCounter = static_cast(0); + uint8_t lqi = static_cast(0); + DataModel::Nullable averageRssi; + DataModel::Nullable lastRssi; + uint8_t frameErrorRate = static_cast(0); + uint8_t messageErrorRate = static_cast(0); + bool rxOnWhenIdle = static_cast(0); + bool fullThreadDevice = static_cast(0); + bool fullNetworkData = static_cast(0); + bool isChild = static_cast(0); - DataModel::List current; - DataModel::List previous; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::RadioFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - - DataModel::DecodableList current; - DataModel::DecodableList previous; - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace RadioFaultChange -namespace NetworkFaultChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +using DecodableType = Type; +} // namespace NeighborTableStruct +namespace OperationalDatasetComponents { enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kActiveTimestampPresent = 0, + kPendingTimestampPresent = 1, + kMasterKeyPresent = 2, + kNetworkNamePresent = 3, + kExtendedPanIdPresent = 4, + kMeshLocalPrefixPresent = 5, + kDelayPresent = 6, + kPanIdPresent = 7, + kChannelPresent = 8, + kPskcPresent = 9, + kSecurityPolicyPresent = 10, + kChannelMaskPresent = 11, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr bool kIsFabricScoped = false; + bool activeTimestampPresent = static_cast(0); + bool pendingTimestampPresent = static_cast(0); + bool masterKeyPresent = static_cast(0); + bool networkNamePresent = static_cast(0); + bool extendedPanIdPresent = static_cast(0); + bool meshLocalPrefixPresent = static_cast(0); + bool delayPresent = static_cast(0); + bool panIdPresent = static_cast(0); + bool channelPresent = static_cast(0); + bool pskcPresent = static_cast(0); + bool securityPolicyPresent = static_cast(0); + bool channelMaskPresent = static_cast(0); - DataModel::List current; - DataModel::List previous; + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - - DataModel::DecodableList current; - DataModel::DecodableList previous; - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace NetworkFaultChange -namespace BootReason { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +using DecodableType = Type; +} // namespace OperationalDatasetComponents +namespace RouteTableStruct { enum class Fields : uint8_t { - kBootReason = 0, + kExtAddress = 0, + kRloc16 = 1, + kRouterId = 2, + kNextHop = 3, + kPathCost = 4, + kLQIIn = 5, + kLQIOut = 6, + kAge = 7, + kAllocated = 8, + kLinkEstablished = 9, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BootReason::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr bool kIsFabricScoped = false; + uint64_t extAddress = static_cast(0); + uint16_t rloc16 = static_cast(0); + uint8_t routerId = static_cast(0); + uint8_t nextHop = static_cast(0); + uint8_t pathCost = static_cast(0); + uint8_t LQIIn = static_cast(0); + uint8_t LQIOut = static_cast(0); + uint8_t age = static_cast(0); + bool allocated = static_cast(0); + bool linkEstablished = static_cast(0); - BootReasonEnum bootReason = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::BootReason::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - - BootReasonEnum bootReason = static_cast(0); +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace BootReason -} // namespace Events -} // namespace GeneralDiagnostics -namespace SoftwareDiagnostics { -namespace Structs { -namespace ThreadMetricsStruct { +} // namespace RouteTableStruct +namespace SecurityPolicy { enum class Fields : uint8_t { - kId = 0, - kName = 1, - kStackFreeCurrent = 2, - kStackFreeMinimum = 3, - kStackSize = 4, + kRotationTime = 0, + kFlags = 1, }; struct Type { public: - uint64_t id = static_cast(0); - Optional name; - Optional stackFreeCurrent; - Optional stackFreeMinimum; - Optional stackSize; + uint16_t rotationTime = static_cast(0); + uint16_t flags = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -8805,21 +8058,21 @@ struct Type using DecodableType = Type; -} // namespace ThreadMetricsStruct +} // namespace SecurityPolicy } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace ResetWatermarks { +namespace ResetCounts { struct Type; struct DecodableType; -} // namespace ResetWatermarks +} // namespace ResetCounts } // namespace Commands namespace Commands { -namespace ResetWatermarks { +namespace ResetCounts { enum class Fields : uint8_t { }; @@ -8828,8 +8081,8 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ResetWatermarks::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -8841,637 +8094,564 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ResetWatermarks::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ResetWatermarks +}; // namespace ResetCounts } // namespace Commands namespace Attributes { -namespace ThreadMetrics { +namespace Channel { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ThreadMetrics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Channel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ThreadMetrics -namespace CurrentHeapFree { +} // namespace Channel +namespace RoutingRole { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapFree::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RoutingRole::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentHeapFree -namespace CurrentHeapUsed { +} // namespace RoutingRole +namespace NetworkName { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapUsed::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NetworkName::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } }; -} // namespace CurrentHeapUsed -namespace CurrentHeapHighWatermark { +} // namespace NetworkName +namespace PanId { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentHeapHighWatermark::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PanId::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentHeapHighWatermark -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace PanId +namespace ExtendedPanId { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ExtendedPanId::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace ExtendedPanId +namespace MeshLocalPrefix { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MeshLocalPrefix::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 17; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +} // namespace MeshLocalPrefix +namespace OverrunCount { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace OverrunCount +namespace NeighborTable { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NeighborTable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace NeighborTable +namespace RouteTable { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RouteTable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace RouteTable +namespace PartitionId { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } -}; -} // namespace ClusterRevision + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PartitionId::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PartitionId +namespace Weighting { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - Attributes::ThreadMetrics::TypeInfo::DecodableType threadMetrics; - Attributes::CurrentHeapFree::TypeInfo::DecodableType currentHeapFree = static_cast(0); - Attributes::CurrentHeapUsed::TypeInfo::DecodableType currentHeapUsed = static_cast(0); - Attributes::CurrentHeapHighWatermark::TypeInfo::DecodableType currentHeapHighWatermark = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Weighting::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -namespace Events { -namespace SoftwareFault { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace Weighting +namespace DataVersion { +struct TypeInfo { - kId = 0, - kName = 1, - kFaultRecording = 2, -}; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DataVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DataVersion +namespace StableDataVersion { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } - static constexpr bool kIsFabricScoped = false; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint64_t id = static_cast(0); - Optional name; - Optional faultRecording; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StableDataVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StableDataVersion +namespace LeaderRouterId { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LeaderRouterId::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace LeaderRouterId +namespace DetachedRoleCount { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DetachedRoleCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DetachedRoleCount +namespace ChildRoleCount { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SoftwareFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SoftwareDiagnostics::Id; } + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - uint64_t id = static_cast(0); - Optional name; - Optional faultRecording; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChildRoleCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ChildRoleCount +namespace RouterRoleCount { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RouterRoleCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SoftwareFault -} // namespace Events -} // namespace SoftwareDiagnostics -namespace ThreadNetworkDiagnostics { -namespace Structs { -namespace NeighborTableStruct { -enum class Fields : uint8_t +} // namespace RouterRoleCount +namespace LeaderRoleCount { +struct TypeInfo { - kExtAddress = 0, - kAge = 1, - kRloc16 = 2, - kLinkFrameCounter = 3, - kMleFrameCounter = 4, - kLqi = 5, - kAverageRssi = 6, - kLastRssi = 7, - kFrameErrorRate = 8, - kMessageErrorRate = 9, - kRxOnWhenIdle = 10, - kFullThreadDevice = 11, - kFullNetworkData = 12, - kIsChild = 13, -}; - -struct Type -{ -public: - uint64_t extAddress = static_cast(0); - uint32_t age = static_cast(0); - uint16_t rloc16 = static_cast(0); - uint32_t linkFrameCounter = static_cast(0); - uint32_t mleFrameCounter = static_cast(0); - uint8_t lqi = static_cast(0); - DataModel::Nullable averageRssi; - DataModel::Nullable lastRssi; - uint8_t frameErrorRate = static_cast(0); - uint8_t messageErrorRate = static_cast(0); - bool rxOnWhenIdle = static_cast(0); - bool fullThreadDevice = static_cast(0); - bool fullNetworkData = static_cast(0); - bool isChild = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -} // namespace NeighborTableStruct -namespace OperationalDatasetComponents { -enum class Fields : uint8_t -{ - kActiveTimestampPresent = 0, - kPendingTimestampPresent = 1, - kMasterKeyPresent = 2, - kNetworkNamePresent = 3, - kExtendedPanIdPresent = 4, - kMeshLocalPrefixPresent = 5, - kDelayPresent = 6, - kPanIdPresent = 7, - kChannelPresent = 8, - kPskcPresent = 9, - kSecurityPolicyPresent = 10, - kChannelMaskPresent = 11, + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LeaderRoleCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct Type +} // namespace LeaderRoleCount +namespace AttachAttemptCount { +struct TypeInfo { -public: - bool activeTimestampPresent = static_cast(0); - bool pendingTimestampPresent = static_cast(0); - bool masterKeyPresent = static_cast(0); - bool networkNamePresent = static_cast(0); - bool extendedPanIdPresent = static_cast(0); - bool meshLocalPrefixPresent = static_cast(0); - bool delayPresent = static_cast(0); - bool panIdPresent = static_cast(0); - bool channelPresent = static_cast(0); - bool pskcPresent = static_cast(0); - bool securityPolicyPresent = static_cast(0); - bool channelMaskPresent = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -} // namespace OperationalDatasetComponents -namespace RouteTableStruct { -enum class Fields : uint8_t -{ - kExtAddress = 0, - kRloc16 = 1, - kRouterId = 2, - kNextHop = 3, - kPathCost = 4, - kLQIIn = 5, - kLQIOut = 6, - kAge = 7, - kAllocated = 8, - kLinkEstablished = 9, + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AttachAttemptCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct Type +} // namespace AttachAttemptCount +namespace PartitionIdChangeCount { +struct TypeInfo { -public: - uint64_t extAddress = static_cast(0); - uint16_t rloc16 = static_cast(0); - uint8_t routerId = static_cast(0); - uint8_t nextHop = static_cast(0); - uint8_t pathCost = static_cast(0); - uint8_t LQIIn = static_cast(0); - uint8_t LQIOut = static_cast(0); - uint8_t age = static_cast(0); - bool allocated = static_cast(0); - bool linkEstablished = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -} // namespace RouteTableStruct -namespace SecurityPolicy { -enum class Fields : uint8_t -{ - kRotationTime = 0, - kFlags = 1, + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PartitionIdChangeCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct Type +} // namespace PartitionIdChangeCount +namespace BetterPartitionAttachAttemptCount { +struct TypeInfo { -public: - uint16_t rotationTime = static_cast(0); - uint16_t flags = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BetterPartitionAttachAttemptCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -using DecodableType = Type; - -} // namespace SecurityPolicy -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ResetCounts { -struct Type; -struct DecodableType; -} // namespace ResetCounts - -} // namespace Commands - -namespace Commands { -namespace ResetCounts { -enum class Fields : uint8_t +} // namespace BetterPartitionAttachAttemptCount +namespace ParentChangeCount { +struct TypeInfo { -}; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr AttributeId GetAttributeId() { return Attributes::ParentChangeCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace ParentChangeCount +namespace TxTotalCount { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxTotalCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ResetCounts -} // namespace Commands - -namespace Attributes { - -namespace Channel { +} // namespace TxTotalCount +namespace TxUnicastCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Channel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxUnicastCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Channel -namespace RoutingRole { +} // namespace TxUnicastCount +namespace TxBroadcastCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RoutingRole::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxBroadcastCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RoutingRole -namespace NetworkName { +} // namespace TxBroadcastCount +namespace TxAckRequestedCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NetworkName::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxAckRequestedCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } }; -} // namespace NetworkName -namespace PanId { +} // namespace TxAckRequestedCount +namespace TxAckedCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PanId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxAckedCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PanId -namespace ExtendedPanId { +} // namespace TxAckedCount +namespace TxNoAckRequestedCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ExtendedPanId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxNoAckRequestedCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ExtendedPanId -namespace MeshLocalPrefix { +} // namespace TxNoAckRequestedCount +namespace TxDataCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeshLocalPrefix::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxDataCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 17; } }; -} // namespace MeshLocalPrefix -namespace OverrunCount { +} // namespace TxDataCount +namespace TxDataPollCount { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxDataPollCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OverrunCount -namespace NeighborTable { +} // namespace TxDataPollCount +namespace TxBeaconCount { struct TypeInfo { - using Type = - chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTableStruct::DecodableType> &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NeighborTable::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxBeaconCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NeighborTable -namespace RouteTable { +} // namespace TxBeaconCount +namespace TxBeaconRequestCount { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::RouteTableStruct::DecodableType> &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RouteTable::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxBeaconRequestCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RouteTable -namespace PartitionId { +} // namespace TxBeaconRequestCount +namespace TxOtherCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PartitionId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxOtherCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PartitionId -namespace Weighting { +} // namespace TxOtherCount +namespace TxRetryCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Weighting::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxRetryCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Weighting -namespace DataVersion { +} // namespace TxRetryCount +namespace TxDirectMaxRetryExpiryCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DataVersion::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxDirectMaxRetryExpiryCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DataVersion -namespace StableDataVersion { +} // namespace TxDirectMaxRetryExpiryCount +namespace TxIndirectMaxRetryExpiryCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StableDataVersion::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxIndirectMaxRetryExpiryCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StableDataVersion -namespace LeaderRouterId { +} // namespace TxIndirectMaxRetryExpiryCount +namespace TxErrCcaCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LeaderRouterId::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxErrCcaCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LeaderRouterId -namespace DetachedRoleCount { +} // namespace TxErrCcaCount +namespace TxErrAbortCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DetachedRoleCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxErrAbortCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DetachedRoleCount -namespace ChildRoleCount { +} // namespace TxErrAbortCount +namespace TxErrBusyChannelCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChildRoleCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxErrBusyChannelCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ChildRoleCount -namespace RouterRoleCount { +} // namespace TxErrBusyChannelCount +namespace RxTotalCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RouterRoleCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxTotalCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RouterRoleCount -namespace LeaderRoleCount { +} // namespace RxTotalCount +namespace RxUnicastCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LeaderRoleCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxUnicastCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LeaderRoleCount -namespace AttachAttemptCount { +} // namespace RxUnicastCount +namespace RxBroadcastCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AttachAttemptCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxBroadcastCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AttachAttemptCount -namespace PartitionIdChangeCount { +} // namespace RxBroadcastCount +namespace RxDataCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PartitionIdChangeCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxDataCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PartitionIdChangeCount -namespace BetterPartitionAttachAttemptCount { +} // namespace RxDataCount +namespace RxDataPollCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BetterPartitionAttachAttemptCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxDataPollCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BetterPartitionAttachAttemptCount -namespace ParentChangeCount { +} // namespace RxDataPollCount +namespace RxBeaconCount { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ParentChangeCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxBeaconCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ParentChangeCount -namespace TxTotalCount { +} // namespace RxBeaconCount +namespace RxBeaconRequestCount { struct TypeInfo { using Type = uint32_t; @@ -9479,11 +8659,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxTotalCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxBeaconRequestCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxTotalCount -namespace TxUnicastCount { +} // namespace RxBeaconRequestCount +namespace RxOtherCount { struct TypeInfo { using Type = uint32_t; @@ -9491,11 +8671,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxUnicastCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxOtherCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxUnicastCount -namespace TxBroadcastCount { +} // namespace RxOtherCount +namespace RxAddressFilteredCount { struct TypeInfo { using Type = uint32_t; @@ -9503,23 +8683,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxBroadcastCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxAddressFilteredCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxBroadcastCount -namespace TxAckRequestedCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxAckRequestedCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TxAckRequestedCount -namespace TxAckedCount { +} // namespace RxAddressFilteredCount +namespace RxDestAddrFilteredCount { struct TypeInfo { using Type = uint32_t; @@ -9527,11 +8695,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxAckedCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxDestAddrFilteredCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxAckedCount -namespace TxNoAckRequestedCount { +} // namespace RxDestAddrFilteredCount +namespace RxDuplicatedCount { struct TypeInfo { using Type = uint32_t; @@ -9539,11 +8707,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxNoAckRequestedCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxDuplicatedCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxNoAckRequestedCount -namespace TxDataCount { +} // namespace RxDuplicatedCount +namespace RxErrNoFrameCount { struct TypeInfo { using Type = uint32_t; @@ -9551,11 +8719,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxDataCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrNoFrameCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDataCount -namespace TxDataPollCount { +} // namespace RxErrNoFrameCount +namespace RxErrUnknownNeighborCount { struct TypeInfo { using Type = uint32_t; @@ -9563,11 +8731,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxDataPollCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrUnknownNeighborCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDataPollCount -namespace TxBeaconCount { +} // namespace RxErrUnknownNeighborCount +namespace RxErrInvalidSrcAddrCount { struct TypeInfo { using Type = uint32_t; @@ -9575,11 +8743,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxBeaconCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrInvalidSrcAddrCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxBeaconCount -namespace TxBeaconRequestCount { +} // namespace RxErrInvalidSrcAddrCount +namespace RxErrSecCount { struct TypeInfo { using Type = uint32_t; @@ -9587,11 +8755,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxBeaconRequestCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrSecCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxBeaconRequestCount -namespace TxOtherCount { +} // namespace RxErrSecCount +namespace RxErrFcsCount { struct TypeInfo { using Type = uint32_t; @@ -9599,11 +8767,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxOtherCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrFcsCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxOtherCount -namespace TxRetryCount { +} // namespace RxErrFcsCount +namespace RxErrOtherCount { struct TypeInfo { using Type = uint32_t; @@ -9611,409 +8779,145 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxRetryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxErrOtherCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxRetryCount -namespace TxDirectMaxRetryExpiryCount { +} // namespace RxErrOtherCount +namespace ActiveTimestamp { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxDirectMaxRetryExpiryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveTimestamp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDirectMaxRetryExpiryCount -namespace TxIndirectMaxRetryExpiryCount { +} // namespace ActiveTimestamp +namespace PendingTimestamp { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxIndirectMaxRetryExpiryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PendingTimestamp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxIndirectMaxRetryExpiryCount -namespace TxErrCcaCount { +} // namespace PendingTimestamp +namespace Delay { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxErrCcaCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Delay::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxErrCcaCount -namespace TxErrAbortCount { +} // namespace Delay +namespace SecurityPolicy { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxErrAbortCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SecurityPolicy::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxErrAbortCount -namespace TxErrBusyChannelCount { +} // namespace SecurityPolicy +namespace ChannelPage0Mask { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxErrBusyChannelCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChannelPage0Mask::Id; } static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 4; } }; -} // namespace TxErrBusyChannelCount -namespace RxTotalCount { +} // namespace ChannelPage0Mask +namespace OperationalDatasetComponents { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = + chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType>; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxTotalCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalDatasetComponents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxTotalCount -namespace RxUnicastCount { +} // namespace OperationalDatasetComponents +namespace ActiveNetworkFaultsList { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxUnicastCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveNetworkFaultsList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxUnicastCount -namespace RxBroadcastCount { -struct TypeInfo +} // namespace ActiveNetworkFaultsList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxBroadcastCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxBroadcastCount -namespace RxDataCount { -struct TypeInfo +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDataCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxDataCount -namespace RxDataPollCount { -struct TypeInfo +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDataPollCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxDataPollCount -namespace RxBeaconCount { -struct TypeInfo +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxBeaconCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxBeaconCount -namespace RxBeaconRequestCount { -struct TypeInfo +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxBeaconRequestCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxBeaconRequestCount -namespace RxOtherCount { -struct TypeInfo +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxOtherCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxOtherCount -namespace RxAddressFilteredCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +} // namespace ClusterRevision - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxAddressFilteredCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxAddressFilteredCount -namespace RxDestAddrFilteredCount { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDestAddrFilteredCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxDestAddrFilteredCount -namespace RxDuplicatedCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDuplicatedCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxDuplicatedCount -namespace RxErrNoFrameCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrNoFrameCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrNoFrameCount -namespace RxErrUnknownNeighborCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrUnknownNeighborCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrUnknownNeighborCount -namespace RxErrInvalidSrcAddrCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrInvalidSrcAddrCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrInvalidSrcAddrCount -namespace RxErrSecCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrSecCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrSecCount -namespace RxErrFcsCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrFcsCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrFcsCount -namespace RxErrOtherCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrOtherCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RxErrOtherCount -namespace ActiveTimestamp { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveTimestamp::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveTimestamp -namespace PendingTimestamp { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PendingTimestamp::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PendingTimestamp -namespace Delay { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Delay::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Delay -namespace SecurityPolicy { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = - chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SecurityPolicy::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SecurityPolicy -namespace ChannelPage0Mask { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChannelPage0Mask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 4; } -}; -} // namespace ChannelPage0Mask -namespace OperationalDatasetComponents { -struct TypeInfo -{ - using Type = - chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType>; - using DecodableArgType = const chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalDatasetComponents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OperationalDatasetComponents -namespace ActiveNetworkFaultsList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveNetworkFaultsList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveNetworkFaultsList -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::Channel::TypeInfo::DecodableType channel; Attributes::RoutingRole::TypeInfo::DecodableType routingRole; @@ -10981,313 +9885,1007 @@ struct Type static constexpr bool MustUseTimedInvoke() { return false; } }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::SetTimeZone::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - - DataModel::DecodableList timeZone; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace SetTimeZone -namespace SetTimeZoneResponse { +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetTimeZone::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::DecodableList timeZone; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetTimeZone +namespace SetTimeZoneResponse { +enum class Fields : uint8_t +{ + kDSTOffsetRequired = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + bool DSTOffsetRequired = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + bool DSTOffsetRequired = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetTimeZoneResponse +namespace SetDSTOffset { +enum class Fields : uint8_t +{ + kDSTOffset = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::List DSTOffset; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::DecodableList DSTOffset; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetDSTOffset +namespace SetDefaultNTP { +enum class Fields : uint8_t +{ + kDefaultNTP = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::Nullable defaultNTP; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::Nullable defaultNTP; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetDefaultNTP +} // namespace Commands + +namespace Attributes { + +namespace UTCTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UTCTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace UTCTime +namespace Granularity { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeSynchronization::GranularityEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::GranularityEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::GranularityEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Granularity::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Granularity +namespace TimeSource { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeSource::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeSource +namespace TrustedTimeSource { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = + chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable< + chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TrustedTimeSource::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TrustedTimeSource +namespace DefaultNTP { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DefaultNTP::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 128; } +}; +} // namespace DefaultNTP +namespace TimeZone { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZone::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeZone +namespace DSTOffset { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffset::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DSTOffset +namespace LocalTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LocalTime +namespace TimeZoneDatabase { +struct TypeInfo +{ + using Type = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneDatabase::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeZoneDatabase +namespace NTPServerAvailable { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NTPServerAvailable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NTPServerAvailable +namespace TimeZoneListMaxSize { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneListMaxSize::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeZoneListMaxSize +namespace DSTOffsetListMaxSize { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffsetListMaxSize::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DSTOffsetListMaxSize +namespace SupportsDNSResolve { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportsDNSResolve::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportsDNSResolve +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::UTCTime::TypeInfo::DecodableType UTCTime; + Attributes::Granularity::TypeInfo::DecodableType granularity = + static_cast(0); + Attributes::TimeSource::TypeInfo::DecodableType timeSource = + static_cast(0); + Attributes::TrustedTimeSource::TypeInfo::DecodableType trustedTimeSource; + Attributes::DefaultNTP::TypeInfo::DecodableType defaultNTP; + Attributes::TimeZone::TypeInfo::DecodableType timeZone; + Attributes::DSTOffset::TypeInfo::DecodableType DSTOffset; + Attributes::LocalTime::TypeInfo::DecodableType localTime; + Attributes::TimeZoneDatabase::TypeInfo::DecodableType timeZoneDatabase = + static_cast(0); + Attributes::NTPServerAvailable::TypeInfo::DecodableType NTPServerAvailable = static_cast(0); + Attributes::TimeZoneListMaxSize::TypeInfo::DecodableType timeZoneListMaxSize = static_cast(0); + Attributes::DSTOffsetListMaxSize::TypeInfo::DecodableType DSTOffsetListMaxSize = static_cast(0); + Attributes::SupportsDNSResolve::TypeInfo::DecodableType supportsDNSResolve = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace DSTTableEmpty { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DSTTableEmpty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DSTTableEmpty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace DSTTableEmpty +namespace DSTStatus { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kDSTOffsetActive = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DSTStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = false; + + bool DSTOffsetActive = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DSTStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + bool DSTOffsetActive = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace DSTStatus +namespace TimeZoneStatus { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kOffset = 0, + kName = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = false; + + int32_t offset = static_cast(0); + Optional name; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + int32_t offset = static_cast(0); + Optional name; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace TimeZoneStatus +namespace TimeFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TimeFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::TimeFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace TimeFailure +namespace MissingTrustedTimeSource { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MissingTrustedTimeSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MissingTrustedTimeSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace MissingTrustedTimeSource +} // namespace Events +} // namespace TimeSynchronization +namespace BridgedDeviceBasicInformation { +namespace Structs { +namespace ProductAppearanceStruct { +enum class Fields : uint8_t +{ + kFinish = 0, + kPrimaryColor = 1, +}; + +struct Type +{ +public: + ProductFinishEnum finish = static_cast(0); + DataModel::Nullable primaryColor; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace ProductAppearanceStruct +} // namespace Structs + +namespace Attributes { + +namespace VendorName { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace VendorName +namespace VendorID { +struct TypeInfo +{ + using Type = chip::VendorId; + using DecodableType = chip::VendorId; + using DecodableArgType = chip::VendorId; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace VendorID +namespace ProductName { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductName::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace ProductName +namespace NodeLabel { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NodeLabel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace NodeLabel +namespace HardwareVersion { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace HardwareVersion +namespace HardwareVersionString { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersionString::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace HardwareVersionString +namespace SoftwareVersion { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SoftwareVersion +namespace SoftwareVersionString { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersionString::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace SoftwareVersionString +namespace ManufacturingDate { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ManufacturingDate::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace ManufacturingDate +namespace PartNumber { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PartNumber::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace PartNumber +namespace ProductURL { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductURL::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 256; } +}; +} // namespace ProductURL +namespace ProductLabel { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductLabel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace ProductLabel +namespace SerialNumber { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SerialNumber::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace SerialNumber +namespace Reachable { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Reachable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Reachable +namespace UniqueID { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UniqueID::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 32; } +}; +} // namespace UniqueID +namespace ProductAppearance { +struct TypeInfo +{ + using Type = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type; + using DecodableType = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType; + using DecodableArgType = + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ProductAppearance +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::VendorName::TypeInfo::DecodableType vendorName; + Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); + Attributes::ProductName::TypeInfo::DecodableType productName; + Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; + Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); + Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; + Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); + Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; + Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; + Attributes::PartNumber::TypeInfo::DecodableType partNumber; + Attributes::ProductURL::TypeInfo::DecodableType productURL; + Attributes::ProductLabel::TypeInfo::DecodableType productLabel; + Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; + Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); + Attributes::UniqueID::TypeInfo::DecodableType uniqueID; + Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace StartUp { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + enum class Fields : uint8_t { - kDSTOffsetRequired = 0, + kSoftwareVersion = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr bool kIsFabricScoped = false; - bool DSTOffsetRequired = static_cast(0); + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + + uint32_t softwareVersion = static_cast(0); - bool DSTOffsetRequired = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTimeZoneResponse -namespace SetDSTOffset { +} // namespace StartUp +namespace ShutDown { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + enum class Fields : uint8_t { - kDSTOffset = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - - DataModel::List DSTOffset; + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - DataModel::DecodableList DSTOffset; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetDSTOffset -namespace SetDefaultNTP { +} // namespace ShutDown +namespace Leave { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kDefaultNTP = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - - DataModel::Nullable defaultNTP; + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - DataModel::Nullable defaultNTP; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetDefaultNTP -} // namespace Commands - -namespace Attributes { - -namespace UTCTime { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace Leave +namespace ReachableChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UTCTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace UTCTime -namespace Granularity { -struct TypeInfo +enum class Fields : uint8_t { - using Type = chip::app::Clusters::TimeSynchronization::GranularityEnum; - using DecodableType = chip::app::Clusters::TimeSynchronization::GranularityEnum; - using DecodableArgType = chip::app::Clusters::TimeSynchronization::GranularityEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Granularity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kReachableNewValue = 0, }; -} // namespace Granularity -namespace TimeSource { -struct TypeInfo -{ - using Type = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; - using DecodableType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; - using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeSourceEnum; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeSource::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TimeSource -namespace TrustedTimeSource { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = - chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable< - chip::app::Clusters::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TrustedTimeSource::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TrustedTimeSource -namespace DefaultNTP { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + bool reachableNewValue = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DefaultNTP::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 128; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace DefaultNTP -namespace TimeZone { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeZone::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TimeZone -namespace DSTOffset { -struct TypeInfo +struct DecodableType { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffset::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DSTOffset -namespace LocalTime { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + bool reachableNewValue = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocalTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LocalTime -namespace TimeZoneDatabase { -struct TypeInfo -{ - using Type = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; - using DecodableType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; - using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; +} // namespace ReachableChanged +} // namespace Events +} // namespace BridgedDeviceBasicInformation +namespace Switch { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneDatabase::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TimeZoneDatabase -namespace NTPServerAvailable { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; +namespace Attributes { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NTPServerAvailable::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NTPServerAvailable -namespace TimeZoneListMaxSize { +namespace NumberOfPositions { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneListMaxSize::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPositions::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimeZoneListMaxSize -namespace DSTOffsetListMaxSize { +} // namespace NumberOfPositions +namespace CurrentPosition { struct TypeInfo { using Type = uint8_t; using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffsetListMaxSize::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPosition::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DSTOffsetListMaxSize -namespace SupportsDNSResolve { +} // namespace CurrentPosition +namespace MultiPressMax { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportsDNSResolve::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MultiPressMax::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportsDNSResolve +} // namespace MultiPressMax namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace ClusterRevision @@ -11295,26 +10893,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::UTCTime::TypeInfo::DecodableType UTCTime; - Attributes::Granularity::TypeInfo::DecodableType granularity = - static_cast(0); - Attributes::TimeSource::TypeInfo::DecodableType timeSource = - static_cast(0); - Attributes::TrustedTimeSource::TypeInfo::DecodableType trustedTimeSource; - Attributes::DefaultNTP::TypeInfo::DecodableType defaultNTP; - Attributes::TimeZone::TypeInfo::DecodableType timeZone; - Attributes::DSTOffset::TypeInfo::DecodableType DSTOffset; - Attributes::LocalTime::TypeInfo::DecodableType localTime; - Attributes::TimeZoneDatabase::TypeInfo::DecodableType timeZoneDatabase = - static_cast(0); - Attributes::NTPServerAvailable::TypeInfo::DecodableType NTPServerAvailable = static_cast(0); - Attributes::TimeZoneListMaxSize::TypeInfo::DecodableType timeZoneListMaxSize = static_cast(0); - Attributes::DSTOffsetListMaxSize::TypeInfo::DecodableType DSTOffsetListMaxSize = static_cast(0); - Attributes::SupportsDNSResolve::TypeInfo::DecodableType supportsDNSResolve = static_cast(0); + Attributes::NumberOfPositions::TypeInfo::DecodableType numberOfPositions = static_cast(0); + Attributes::CurrentPosition::TypeInfo::DecodableType currentPosition = static_cast(0); + Attributes::MultiPressMax::TypeInfo::DecodableType multiPressMax = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -11325,21 +10910,24 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace DSTTableEmpty { +namespace SwitchLatched { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kNewPosition = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DSTTableEmpty::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } static constexpr bool kIsFabricScoped = false; + uint8_t newPosition = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -11347,29 +10935,31 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DSTTableEmpty::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DSTTableEmpty -namespace DSTStatus { +} // namespace SwitchLatched +namespace InitialPress { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kDSTOffsetActive = 0, + kNewPosition = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DSTStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::InitialPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } static constexpr bool kIsFabricScoped = false; - bool DSTOffsetActive = static_cast(0); + uint8_t newPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -11378,33 +10968,31 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DSTStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::InitialPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - bool DSTOffsetActive = static_cast(0); + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DSTStatus -namespace TimeZoneStatus { +} // namespace InitialPress +namespace LongPress { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kOffset = 0, - kName = 1, + kNewPosition = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::LongPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } static constexpr bool kIsFabricScoped = false; - int32_t offset = static_cast(0); - Optional name; + uint8_t newPosition = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -11413,340 +11001,355 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr EventId GetEventId() { return Events::LongPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - int32_t offset = static_cast(0); - Optional name; + uint8_t newPosition = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TimeZoneStatus -namespace TimeFailure { +} // namespace LongPress +namespace ShortRelease { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kPreviousPosition = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr bool kIsFabricScoped = false; + + uint8_t previousPosition = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t previousPosition = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ShortRelease +namespace LongRelease { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kPreviousPosition = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LongRelease::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr bool kIsFabricScoped = false; + + uint8_t previousPosition = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LongRelease::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t previousPosition = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace LongRelease +namespace MultiPressOngoing { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kNewPosition = 0, + kCurrentNumberOfPressesCounted = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr bool kIsFabricScoped = false; + + uint8_t newPosition = static_cast(0); + uint8_t currentNumberOfPressesCounted = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t newPosition = static_cast(0); + uint8_t currentNumberOfPressesCounted = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace MultiPressOngoing +namespace MultiPressComplete { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kPreviousPosition = 0, + kTotalNumberOfPressesCounted = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr bool kIsFabricScoped = false; + + uint8_t previousPosition = static_cast(0); + uint8_t totalNumberOfPressesCounted = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t previousPosition = static_cast(0); + uint8_t totalNumberOfPressesCounted = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace MultiPressComplete +} // namespace Events +} // namespace Switch +namespace AdministratorCommissioning { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace OpenCommissioningWindow { +struct Type; +struct DecodableType; +} // namespace OpenCommissioningWindow + +namespace OpenBasicCommissioningWindow { +struct Type; +struct DecodableType; +} // namespace OpenBasicCommissioningWindow + +namespace RevokeCommissioning { +struct Type; +struct DecodableType; +} // namespace RevokeCommissioning + +} // namespace Commands + +namespace Commands { +namespace OpenCommissioningWindow { +enum class Fields : uint8_t +{ + kCommissioningTimeout = 0, + kPAKEPasscodeVerifier = 1, + kDiscriminator = 2, + kIterations = 3, + kSalt = 4, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TimeFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + + uint16_t commissioningTimeout = static_cast(0); + chip::ByteSpan PAKEPasscodeVerifier; + uint16_t discriminator = static_cast(0); + uint32_t iterations = static_cast(0); + chip::ByteSpan salt; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TimeFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + uint16_t commissioningTimeout = static_cast(0); + chip::ByteSpan PAKEPasscodeVerifier; + uint16_t discriminator = static_cast(0); + uint32_t iterations = static_cast(0); + chip::ByteSpan salt; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TimeFailure -namespace MissingTrustedTimeSource { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace OpenCommissioningWindow +namespace OpenBasicCommissioningWindow { enum class Fields : uint8_t { + kCommissioningTimeout = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MissingTrustedTimeSource::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + + uint16_t commissioningTimeout = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MissingTrustedTimeSource::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + uint16_t commissioningTimeout = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MissingTrustedTimeSource -} // namespace Events -} // namespace TimeSynchronization -namespace BridgedDeviceBasicInformation { -namespace Structs { -namespace ProductAppearanceStruct { +}; // namespace OpenBasicCommissioningWindow +namespace RevokeCommissioning { enum class Fields : uint8_t { - kFinish = 0, - kPrimaryColor = 1, }; struct Type { public: - ProductFinishEnum finish = static_cast(0); - DataModel::Nullable primaryColor; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace ProductAppearanceStruct -} // namespace Structs - -namespace Attributes { - -namespace VendorName { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorName::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } -}; -} // namespace VendorName -namespace VendorID { -struct TypeInfo -{ - using Type = chip::VendorId; - using DecodableType = chip::VendorId; - using DecodableArgType = chip::VendorId; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VendorID::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace VendorID -namespace ProductName { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductName::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } -}; -} // namespace ProductName -namespace NodeLabel { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NodeLabel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } -}; -} // namespace NodeLabel -namespace HardwareVersion { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace HardwareVersion -namespace HardwareVersionString { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersionString::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } -}; -} // namespace HardwareVersionString -namespace SoftwareVersion { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SoftwareVersion -namespace SoftwareVersionString { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersionString::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } -}; -} // namespace SoftwareVersionString -namespace ManufacturingDate { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ManufacturingDate::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace ManufacturingDate -namespace PartNumber { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PartNumber::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } + static constexpr bool MustUseTimedInvoke() { return true; } }; -} // namespace PartNumber -namespace ProductURL { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductURL::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 256; } -}; -} // namespace ProductURL -namespace ProductLabel { -struct TypeInfo +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductLabel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ProductLabel -namespace SerialNumber { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +}; // namespace RevokeCommissioning +} // namespace Commands - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SerialNumber::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } -}; -} // namespace SerialNumber -namespace Reachable { +namespace Attributes { + +namespace WindowStatus { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; + using DecodableType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; + using DecodableArgType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Reachable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WindowStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Reachable -namespace UniqueID { +} // namespace WindowStatus +namespace AdminFabricIndex { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UniqueID::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AdminFabricIndex::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 32; } }; -} // namespace UniqueID -namespace ProductAppearance { +} // namespace AdminFabricIndex +namespace AdminVendorId { struct TypeInfo { - using Type = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type; - using DecodableType = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType; - using DecodableArgType = - const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AdminVendorId::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ProductAppearance +} // namespace AdminVendorId namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace ClusterRevision @@ -11754,26 +11357,14 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::VendorName::TypeInfo::DecodableType vendorName; - Attributes::VendorID::TypeInfo::DecodableType vendorID = static_cast(0); - Attributes::ProductName::TypeInfo::DecodableType productName; - Attributes::NodeLabel::TypeInfo::DecodableType nodeLabel; - Attributes::HardwareVersion::TypeInfo::DecodableType hardwareVersion = static_cast(0); - Attributes::HardwareVersionString::TypeInfo::DecodableType hardwareVersionString; - Attributes::SoftwareVersion::TypeInfo::DecodableType softwareVersion = static_cast(0); - Attributes::SoftwareVersionString::TypeInfo::DecodableType softwareVersionString; - Attributes::ManufacturingDate::TypeInfo::DecodableType manufacturingDate; - Attributes::PartNumber::TypeInfo::DecodableType partNumber; - Attributes::ProductURL::TypeInfo::DecodableType productURL; - Attributes::ProductLabel::TypeInfo::DecodableType productLabel; - Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; - Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); - Attributes::UniqueID::TypeInfo::DecodableType uniqueID; - Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; + Attributes::WindowStatus::TypeInfo::DecodableType windowStatus = + static_cast(0); + Attributes::AdminFabricIndex::TypeInfo::DecodableType adminFabricIndex; + Attributes::AdminVendorId::TypeInfo::DecodableType adminVendorId; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -11783,669 +11374,678 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace StartUp { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +} // namespace AdministratorCommissioning +namespace OperationalCredentials { +namespace Structs { +namespace FabricDescriptorStruct { enum class Fields : uint8_t { - kSoftwareVersion = 0, + kRootPublicKey = 1, + kVendorID = 2, + kFabricID = 3, + kNodeID = 4, + kLabel = 5, + kFabricIndex = 254, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StartUp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan rootPublicKey; + chip::VendorId vendorID = static_cast(0); + chip::FabricId fabricID = static_cast(0); + chip::NodeId nodeID = static_cast(0); + chip::CharSpan label; + chip::FabricIndex fabricIndex = static_cast(0); - uint32_t softwareVersion = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; + static constexpr bool kIsFabricScoped = true; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StartUp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + auto GetFabricIndex() const { return fabricIndex; } - uint32_t softwareVersion = static_cast(0); + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -} // namespace StartUp -namespace ShutDown { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +using DecodableType = Type; + +} // namespace FabricDescriptorStruct +namespace NOCStruct { enum class Fields : uint8_t { + kNoc = 1, + kIcac = 2, + kFabricIndex = 254, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShutDown::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan noc; + DataModel::Nullable icac; + chip::FabricIndex fabricIndex = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; + CHIP_ERROR Decode(TLV::TLVReader & reader); -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShutDown::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr bool kIsFabricScoped = true; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace ShutDown -namespace Leave { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + auto GetFabricIndex() const { return fabricIndex; } -enum class Fields : uint8_t -{ -}; + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leave::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr bool kIsFabricScoped = false; + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leave::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace Leave -namespace ReachableChanged { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace NOCStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace AttestationRequest { +struct Type; +struct DecodableType; +} // namespace AttestationRequest + +namespace AttestationResponse { +struct Type; +struct DecodableType; +} // namespace AttestationResponse + +namespace CertificateChainRequest { +struct Type; +struct DecodableType; +} // namespace CertificateChainRequest + +namespace CertificateChainResponse { +struct Type; +struct DecodableType; +} // namespace CertificateChainResponse + +namespace CSRRequest { +struct Type; +struct DecodableType; +} // namespace CSRRequest + +namespace CSRResponse { +struct Type; +struct DecodableType; +} // namespace CSRResponse + +namespace AddNOC { +struct Type; +struct DecodableType; +} // namespace AddNOC + +namespace UpdateNOC { +struct Type; +struct DecodableType; +} // namespace UpdateNOC + +namespace NOCResponse { +struct Type; +struct DecodableType; +} // namespace NOCResponse + +namespace UpdateFabricLabel { +struct Type; +struct DecodableType; +} // namespace UpdateFabricLabel +namespace RemoveFabric { +struct Type; +struct DecodableType; +} // namespace RemoveFabric + +namespace AddTrustedRootCertificate { +struct Type; +struct DecodableType; +} // namespace AddTrustedRootCertificate + +} // namespace Commands + +namespace Commands { +namespace AttestationRequest { enum class Fields : uint8_t { - kReachableNewValue = 0, + kAttestationNonce = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AttestationRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - bool reachableNewValue = static_cast(0); + chip::ByteSpan attestationNonce; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ReachableChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - - bool reachableNewValue = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::AttestationRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan attestationNonce; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ReachableChanged -} // namespace Events -} // namespace BridgedDeviceBasicInformation -namespace Switch { - -namespace Attributes { - -namespace NumberOfPositions { -struct TypeInfo +}; // namespace AttestationRequest +namespace AttestationResponse { +enum class Fields : uint8_t { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPositions::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kAttestationElements = 0, + kAttestationSignature = 1, }; -} // namespace NumberOfPositions -namespace CurrentPosition { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPosition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentPosition -namespace MultiPressMax { -struct TypeInfo +struct Type { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AttestationResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MultiPressMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MultiPressMax -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -}; -} // namespace ClusterRevision + chip::ByteSpan attestationElements; + chip::ByteSpan attestationSignature; -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using ResponseType = DataModel::NullObjectType; - Attributes::NumberOfPositions::TypeInfo::DecodableType numberOfPositions = static_cast(0); - Attributes::CurrentPosition::TypeInfo::DecodableType currentPosition = static_cast(0); - Attributes::MultiPressMax::TypeInfo::DecodableType multiPressMax = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -namespace Events { -namespace SwitchLatched { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::AttestationResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + + chip::ByteSpan attestationElements; + chip::ByteSpan attestationSignature; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AttestationResponse +namespace CertificateChainRequest { enum class Fields : uint8_t { - kNewPosition = 0, + kCertificateType = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t newPosition = static_cast(0); + CertificateChainTypeEnum certificateType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SwitchLatched::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t newPosition = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + CertificateChainTypeEnum certificateType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SwitchLatched -namespace InitialPress { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace CertificateChainRequest +namespace CertificateChainResponse { enum class Fields : uint8_t { - kNewPosition = 0, + kCertificate = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InitialPress::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CertificateChainResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t newPosition = static_cast(0); + chip::ByteSpan certificate; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InitialPress::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t newPosition = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::CertificateChainResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan certificate; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InitialPress -namespace LongPress { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace CertificateChainResponse +namespace CSRRequest { enum class Fields : uint8_t { - kNewPosition = 0, + kCSRNonce = 0, + kIsForUpdateNOC = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LongPress::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t newPosition = static_cast(0); + chip::ByteSpan CSRNonce; + Optional isForUpdateNOC; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LongPress::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t newPosition = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan CSRNonce; + Optional isForUpdateNOC; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LongPress -namespace ShortRelease { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace CSRRequest +namespace CSRResponse { enum class Fields : uint8_t { - kPreviousPosition = 0, + kNOCSRElements = 0, + kAttestationSignature = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::CSRResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t previousPosition = static_cast(0); + chip::ByteSpan NOCSRElements; + chip::ByteSpan attestationSignature; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ShortRelease::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t previousPosition = static_cast(0); +{ +public: + static constexpr CommandId GetCommandId() { return Commands::CSRResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan NOCSRElements; + chip::ByteSpan attestationSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ShortRelease -namespace LongRelease { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace CSRResponse +namespace AddNOC { enum class Fields : uint8_t { - kPreviousPosition = 0, + kNOCValue = 0, + kICACValue = 1, + kIPKValue = 2, + kCaseAdminSubject = 3, + kAdminVendorId = 4, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LongRelease::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddNOC::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t previousPosition = static_cast(0); + chip::ByteSpan NOCValue; + Optional ICACValue; + chip::ByteSpan IPKValue; + uint64_t caseAdminSubject = static_cast(0); + chip::VendorId adminVendorId = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LongRelease::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t previousPosition = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::AddNOC::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan NOCValue; + Optional ICACValue; + chip::ByteSpan IPKValue; + uint64_t caseAdminSubject = static_cast(0); + chip::VendorId adminVendorId = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LongRelease -namespace MultiPressOngoing { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace AddNOC +namespace UpdateNOC { enum class Fields : uint8_t { - kNewPosition = 0, - kCurrentNumberOfPressesCounted = 1, + kNOCValue = 0, + kICACValue = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::UpdateNOC::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t newPosition = static_cast(0); - uint8_t currentNumberOfPressesCounted = static_cast(0); + chip::ByteSpan NOCValue; + Optional ICACValue; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MultiPressOngoing::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t newPosition = static_cast(0); - uint8_t currentNumberOfPressesCounted = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::UpdateNOC::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan NOCValue; + Optional ICACValue; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MultiPressOngoing -namespace MultiPressComplete { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace UpdateNOC +namespace NOCResponse { enum class Fields : uint8_t { - kPreviousPosition = 0, - kTotalNumberOfPressesCounted = 1, + kStatusCode = 0, + kFabricIndex = 1, + kDebugText = 2, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t previousPosition = static_cast(0); - uint8_t totalNumberOfPressesCounted = static_cast(0); + NodeOperationalCertStatusEnum statusCode = static_cast(0); + Optional fabricIndex; + Optional debugText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MultiPressComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t previousPosition = static_cast(0); - uint8_t totalNumberOfPressesCounted = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + NodeOperationalCertStatusEnum statusCode = static_cast(0); + Optional fabricIndex; + Optional debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MultiPressComplete -} // namespace Events -} // namespace Switch -namespace AdministratorCommissioning { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace OpenCommissioningWindow { -struct Type; -struct DecodableType; -} // namespace OpenCommissioningWindow - -namespace OpenBasicCommissioningWindow { -struct Type; -struct DecodableType; -} // namespace OpenBasicCommissioningWindow - -namespace RevokeCommissioning { -struct Type; -struct DecodableType; -} // namespace RevokeCommissioning - -} // namespace Commands - -namespace Commands { -namespace OpenCommissioningWindow { +}; // namespace NOCResponse +namespace UpdateFabricLabel { enum class Fields : uint8_t { - kCommissioningTimeout = 0, - kPAKEPasscodeVerifier = 1, - kDiscriminator = 2, - kIterations = 3, - kSalt = 4, + kLabel = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::UpdateFabricLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint16_t commissioningTimeout = static_cast(0); - chip::ByteSpan PAKEPasscodeVerifier; - uint16_t discriminator = static_cast(0); - uint32_t iterations = static_cast(0); - chip::ByteSpan salt; + chip::CharSpan label; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::UpdateFabricLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint16_t commissioningTimeout = static_cast(0); - chip::ByteSpan PAKEPasscodeVerifier; - uint16_t discriminator = static_cast(0); - uint32_t iterations = static_cast(0); - chip::ByteSpan salt; + chip::CharSpan label; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OpenCommissioningWindow -namespace OpenBasicCommissioningWindow { +}; // namespace UpdateFabricLabel +namespace RemoveFabric { enum class Fields : uint8_t { - kCommissioningTimeout = 0, + kFabricIndex = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint16_t commissioningTimeout = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint16_t commissioningTimeout = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OpenBasicCommissioningWindow -namespace RevokeCommissioning { +}; // namespace RemoveFabric +namespace AddTrustedRootCertificate { enum class Fields : uint8_t { + kRootCACertificate = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + + chip::ByteSpan rootCACertificate; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::ByteSpan rootCACertificate; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RevokeCommissioning +}; // namespace AddTrustedRootCertificate } // namespace Commands namespace Attributes { -namespace WindowStatus { +namespace NOCs { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NOCs::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NOCs +namespace Fabrics { +struct TypeInfo +{ + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Fabrics::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Fabrics +namespace SupportedFabrics { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedFabrics::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedFabrics +namespace CommissionedFabrics { struct TypeInfo { - using Type = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; - using DecodableType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; - using DecodableArgType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WindowStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CommissionedFabrics::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace WindowStatus -namespace AdminFabricIndex { +} // namespace CommissionedFabrics +namespace TrustedRootCertificates { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AdminFabricIndex::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TrustedRootCertificates::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AdminFabricIndex -namespace AdminVendorId { +} // namespace TrustedRootCertificates +namespace CurrentFabricIndex { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AdminVendorId::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AdminVendorId +} // namespace CurrentFabricIndex namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace ClusterRevision @@ -12453,14 +12053,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::WindowStatus::TypeInfo::DecodableType windowStatus = - static_cast(0); - Attributes::AdminFabricIndex::TypeInfo::DecodableType adminFabricIndex; - Attributes::AdminVendorId::TypeInfo::DecodableType adminVendorId; + Attributes::NOCs::TypeInfo::DecodableType NOCs; + Attributes::Fabrics::TypeInfo::DecodableType fabrics; + Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); + Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); + Attributes::TrustedRootCertificates::TypeInfo::DecodableType trustedRootCertificates; + Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -12470,32 +12072,26 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace AdministratorCommissioning -namespace OperationalCredentials { +} // namespace OperationalCredentials +namespace GroupKeyManagement { namespace Structs { -namespace FabricDescriptorStruct { +namespace GroupInfoMapStruct { enum class Fields : uint8_t { - kRootPublicKey = 1, - kVendorID = 2, - kFabricID = 3, - kNodeID = 4, - kLabel = 5, - kFabricIndex = 254, + kGroupId = 1, + kEndpoints = 2, + kGroupName = 3, + kFabricIndex = 254, }; struct Type { public: - chip::ByteSpan rootPublicKey; - chip::VendorId vendorID = static_cast(0); - chip::FabricId fabricID = static_cast(0); - chip::NodeId nodeID = static_cast(0); - chip::CharSpan label; + chip::GroupId groupId = static_cast(0); + DataModel::List endpoints; + Optional groupName; chip::FabricIndex fabricIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); - static constexpr bool kIsFabricScoped = true; auto GetFabricIndex() const { return fabricIndex; } @@ -12509,22 +12105,37 @@ struct Type CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + chip::GroupId groupId = static_cast(0); + DataModel::DecodableList endpoints; + Optional groupName; + chip::FabricIndex fabricIndex = static_cast(0); -} // namespace FabricDescriptorStruct -namespace NOCStruct { + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } +}; + +} // namespace GroupInfoMapStruct +namespace GroupKeyMapStruct { enum class Fields : uint8_t { - kNoc = 1, - kIcac = 2, - kFabricIndex = 254, + kGroupId = 1, + kGroupKeySetID = 2, + kFabricIndex = 254, }; struct Type { public: - chip::ByteSpan noc; - DataModel::Nullable icac; + chip::GroupId groupId = static_cast(0); + uint16_t groupKeySetID = static_cast(0); chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -12544,93 +12155,194 @@ struct Type using DecodableType = Type; -} // namespace NOCStruct +} // namespace GroupKeyMapStruct +namespace GroupKeySetStruct { +enum class Fields : uint8_t +{ + kGroupKeySetID = 0, + kGroupKeySecurityPolicy = 1, + kEpochKey0 = 2, + kEpochStartTime0 = 3, + kEpochKey1 = 4, + kEpochStartTime1 = 5, + kEpochKey2 = 6, + kEpochStartTime2 = 7, +}; + +struct Type +{ +public: + uint16_t groupKeySetID = static_cast(0); + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = static_cast(0); + DataModel::Nullable epochKey0; + DataModel::Nullable epochStartTime0; + DataModel::Nullable epochKey1; + DataModel::Nullable epochStartTime1; + DataModel::Nullable epochKey2; + DataModel::Nullable epochStartTime2; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace GroupKeySetStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace AttestationRequest { +namespace KeySetWrite { struct Type; struct DecodableType; -} // namespace AttestationRequest +} // namespace KeySetWrite -namespace AttestationResponse { +namespace KeySetRead { struct Type; struct DecodableType; -} // namespace AttestationResponse +} // namespace KeySetRead -namespace CertificateChainRequest { +namespace KeySetReadResponse { struct Type; struct DecodableType; -} // namespace CertificateChainRequest +} // namespace KeySetReadResponse -namespace CertificateChainResponse { +namespace KeySetRemove { struct Type; struct DecodableType; -} // namespace CertificateChainResponse +} // namespace KeySetRemove -namespace CSRRequest { +namespace KeySetReadAllIndices { struct Type; struct DecodableType; -} // namespace CSRRequest +} // namespace KeySetReadAllIndices -namespace CSRResponse { +namespace KeySetReadAllIndicesResponse { struct Type; struct DecodableType; -} // namespace CSRResponse +} // namespace KeySetReadAllIndicesResponse -namespace AddNOC { -struct Type; -struct DecodableType; -} // namespace AddNOC +} // namespace Commands + +namespace Commands { +namespace KeySetWrite { +enum class Fields : uint8_t +{ + kGroupKeySet = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::KeySetWrite::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + + Structs::GroupKeySetStruct::Type groupKeySet; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::KeySetWrite::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + + Structs::GroupKeySetStruct::DecodableType groupKeySet; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace KeySetWrite +namespace KeySetRead { +enum class Fields : uint8_t +{ + kGroupKeySetID = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + + uint16_t groupKeySetID = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -namespace UpdateNOC { -struct Type; -struct DecodableType; -} // namespace UpdateNOC + uint16_t groupKeySetID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace KeySetRead +namespace KeySetReadResponse { +enum class Fields : uint8_t +{ + kGroupKeySet = 0, +}; -namespace NOCResponse { -struct Type; -struct DecodableType; -} // namespace NOCResponse +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::KeySetReadResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -namespace UpdateFabricLabel { -struct Type; -struct DecodableType; -} // namespace UpdateFabricLabel + Structs::GroupKeySetStruct::Type groupKeySet; -namespace RemoveFabric { -struct Type; -struct DecodableType; -} // namespace RemoveFabric + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace AddTrustedRootCertificate { -struct Type; -struct DecodableType; -} // namespace AddTrustedRootCertificate + using ResponseType = DataModel::NullObjectType; -} // namespace Commands + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace Commands { -namespace AttestationRequest { +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::KeySetReadResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + + Structs::GroupKeySetStruct::DecodableType groupKeySet; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace KeySetReadResponse +namespace KeySetRemove { enum class Fields : uint8_t { - kAttestationNonce = 0, + kGroupKeySetID = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AttestationRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - chip::ByteSpan attestationNonce; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12638,33 +12350,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AttestationRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - chip::ByteSpan attestationNonce; + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AttestationRequest -namespace AttestationResponse { +}; // namespace KeySetRemove +namespace KeySetReadAllIndices { enum class Fields : uint8_t { - kAttestationElements = 0, - kAttestationSignature = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AttestationResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan attestationElements; - chip::ByteSpan attestationSignature; + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12672,32 +12379,30 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AttestationResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - chip::ByteSpan attestationElements; - chip::ByteSpan attestationSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AttestationResponse -namespace CertificateChainRequest { +}; // namespace KeySetReadAllIndices +namespace KeySetReadAllIndicesResponse { enum class Fields : uint8_t { - kCertificateType = 0, + kGroupKeySetIDs = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - CertificateChainTypeEnum certificateType = static_cast(0); + DataModel::List groupKeySetIDs; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12705,443 +12410,507 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - CertificateChainTypeEnum certificateType = static_cast(0); + DataModel::DecodableList groupKeySetIDs; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CertificateChainRequest -namespace CertificateChainResponse { -enum class Fields : uint8_t +}; // namespace KeySetReadAllIndicesResponse +} // namespace Commands + +namespace Attributes { + +namespace GroupKeyMap { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::GroupKeyMap::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace GroupKeyMap +namespace GroupTable { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::GroupTable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace GroupTable +namespace MaxGroupsPerFabric { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxGroupsPerFabric::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxGroupsPerFabric +namespace MaxGroupKeysPerFabric { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxGroupKeysPerFabric::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxGroupKeysPerFabric +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::GroupKeyMap::TypeInfo::DecodableType groupKeyMap; + Attributes::GroupTable::TypeInfo::DecodableType groupTable; + Attributes::MaxGroupsPerFabric::TypeInfo::DecodableType maxGroupsPerFabric = static_cast(0); + Attributes::MaxGroupKeysPerFabric::TypeInfo::DecodableType maxGroupKeysPerFabric = static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace GroupKeyManagement +namespace FixedLabel { +namespace Structs { +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; +} // namespace Structs + +namespace Attributes { + +namespace LabelList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LabelList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kCertificate = 0, + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CertificateChainResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan certificate; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::CertificateChainResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan certificate; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; -}; // namespace CertificateChainResponse -namespace CSRRequest { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kCSRNonce = 0, - kIsForUpdateNOC = 1, + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan CSRNonce; - Optional isForUpdateNOC; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } - using ResponseType = Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - static constexpr bool MustUseTimedInvoke() { return false; } + Attributes::LabelList::TypeInfo::DecodableType labelList; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; +} // namespace Attributes +} // namespace FixedLabel +namespace UserLabel { +namespace Structs { +namespace LabelStruct = Clusters::detail::Structs::LabelStruct; +} // namespace Structs -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } +namespace Attributes { - chip::ByteSpan CSRNonce; - Optional isForUpdateNOC; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace CSRRequest -namespace CSRResponse { -enum class Fields : uint8_t +namespace LabelList { +struct TypeInfo { - kNOCSRElements = 0, - kAttestationSignature = 1, -}; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LabelList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::CSRResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan NOCSRElements; - chip::ByteSpan attestationSignature; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::CSRResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan NOCSRElements; - chip::ByteSpan attestationSignature; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -}; // namespace CSRResponse -namespace AddNOC { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kNOCValue = 0, - kICACValue = 1, - kIPKValue = 2, - kCaseAdminSubject = 3, - kAdminVendorId = 4, + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan NOCValue; - Optional ICACValue; - chip::ByteSpan IPKValue; - uint64_t caseAdminSubject = static_cast(0); - chip::VendorId adminVendorId = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::AddNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan NOCValue; - Optional ICACValue; - chip::ByteSpan IPKValue; - uint64_t caseAdminSubject = static_cast(0); - chip::VendorId adminVendorId = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -}; // namespace AddNOC -namespace UpdateNOC { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kNOCValue = 0, - kICACValue = 1, + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UpdateNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } - chip::ByteSpan NOCValue; - Optional ICACValue; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::LabelList::TypeInfo::DecodableType labelList; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace UserLabel +namespace ProxyConfiguration { - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::UpdateNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan NOCValue; - Optional ICACValue; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; -}; // namespace UpdateNOC -namespace NOCResponse { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kStatusCode = 0, - kFabricIndex = 1, - kDebugText = 2, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - NodeOperationalCertStatusEnum statusCode = static_cast(0); - Optional fabricIndex; - Optional debugText; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - NodeOperationalCertStatusEnum statusCode = static_cast(0); - Optional fabricIndex; - Optional debugText; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; -}; // namespace NOCResponse -namespace UpdateFabricLabel { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kLabel = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UpdateFabricLabel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } - chip::CharSpan label; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ProxyConfiguration +namespace ProxyDiscovery { - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::UpdateFabricLabel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::CharSpan label; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; -}; // namespace UpdateFabricLabel -namespace RemoveFabric { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kFabricIndex = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::FabricIndex fabricIndex = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; -}; // namespace RemoveFabric -namespace AddTrustedRootCertificate { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kRootCACertificate = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } - chip::ByteSpan rootCACertificate; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ProxyDiscovery +namespace ProxyValid { - using ResponseType = DataModel::NullObjectType; +namespace Attributes { - static constexpr bool MustUseTimedInvoke() { return false; } +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan rootCACertificate; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -}; // namespace AddTrustedRootCertificate -} // namespace Commands - -namespace Attributes { - -namespace NOCs { -struct TypeInfo +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NOCs::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -} // namespace NOCs -namespace Fabrics { -struct TypeInfo +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - using Type = - chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Fabrics::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -} // namespace Fabrics -namespace SupportedFabrics { -struct TypeInfo +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedFabrics::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -} // namespace SupportedFabrics -namespace CommissionedFabrics { -struct TypeInfo +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CommissionedFabrics::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -} // namespace CommissionedFabrics -namespace TrustedRootCertificates { +} // namespace ClusterRevision + struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TrustedRootCertificates::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace TrustedRootCertificates -namespace CurrentFabricIndex { +} // namespace Attributes +} // namespace ProxyValid +namespace BooleanState { + +namespace Attributes { + +namespace StateValue { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StateValue::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentFabricIndex +} // namespace StateValue namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } }; } // namespace ClusterRevision @@ -13149,16 +12918,11 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::NOCs::TypeInfo::DecodableType NOCs; - Attributes::Fabrics::TypeInfo::DecodableType fabrics; - Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); - Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); - Attributes::TrustedRootCertificates::TypeInfo::DecodableType trustedRootCertificates; - Attributes::CurrentFabricIndex::TypeInfo::DecodableType currentFabricIndex = static_cast(0); + Attributes::StateValue::TypeInfo::DecodableType stateValue = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -13168,70 +12932,57 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OperationalCredentials -namespace GroupKeyManagement { -namespace Structs { -namespace GroupInfoMapStruct { +namespace Events { +namespace StateChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kGroupId = 1, - kEndpoints = 2, - kGroupName = 3, - kFabricIndex = 254, + kStateValue = 0, }; struct Type { public: - chip::GroupId groupId = static_cast(0); - DataModel::List endpoints; - Optional groupName; - chip::FabricIndex fabricIndex = static_cast(0); - - static constexpr bool kIsFabricScoped = true; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StateChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr bool kIsFabricScoped = false; - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + bool stateValue = static_cast(0); -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - chip::GroupId groupId = static_cast(0); - DataModel::DecodableList endpoints; - Optional groupName; - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = true; + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::StateChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - auto GetFabricIndex() const { return fabricIndex; } + bool stateValue = static_cast(0); - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; - -} // namespace GroupInfoMapStruct -namespace GroupKeyMapStruct { +} // namespace StateChange +} // namespace Events +} // namespace BooleanState +namespace IcdManagement { +namespace Structs { +namespace MonitoringRegistrationStruct { enum class Fields : uint8_t { - kGroupId = 1, - kGroupKeySetID = 2, - kFabricIndex = 254, + kCheckInNodeID = 1, + kMonitoredSubject = 2, + kFabricIndex = 254, }; struct Type { public: - chip::GroupId groupId = static_cast(0); - uint16_t groupKeySetID = static_cast(0); + chip::NodeId checkInNodeID = static_cast(0); + uint64_t monitoredSubject = static_cast(0); chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -13251,130 +13002,64 @@ struct Type using DecodableType = Type; -} // namespace GroupKeyMapStruct -namespace GroupKeySetStruct { -enum class Fields : uint8_t -{ - kGroupKeySetID = 0, - kGroupKeySecurityPolicy = 1, - kEpochKey0 = 2, - kEpochStartTime0 = 3, - kEpochKey1 = 4, - kEpochStartTime1 = 5, - kEpochKey2 = 6, - kEpochStartTime2 = 7, -}; - -struct Type -{ -public: - uint16_t groupKeySetID = static_cast(0); - GroupKeySecurityPolicyEnum groupKeySecurityPolicy = static_cast(0); - DataModel::Nullable epochKey0; - DataModel::Nullable epochStartTime0; - DataModel::Nullable epochKey1; - DataModel::Nullable epochStartTime1; - DataModel::Nullable epochKey2; - DataModel::Nullable epochStartTime2; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace GroupKeySetStruct +} // namespace MonitoringRegistrationStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace KeySetWrite { -struct Type; -struct DecodableType; -} // namespace KeySetWrite - -namespace KeySetRead { +namespace RegisterClient { struct Type; struct DecodableType; -} // namespace KeySetRead +} // namespace RegisterClient -namespace KeySetReadResponse { +namespace RegisterClientResponse { struct Type; struct DecodableType; -} // namespace KeySetReadResponse +} // namespace RegisterClientResponse -namespace KeySetRemove { +namespace UnregisterClient { struct Type; struct DecodableType; -} // namespace KeySetRemove +} // namespace UnregisterClient -namespace KeySetReadAllIndices { +namespace StayActiveRequest { struct Type; struct DecodableType; -} // namespace KeySetReadAllIndices +} // namespace StayActiveRequest -namespace KeySetReadAllIndicesResponse { +namespace StayActiveResponse { struct Type; struct DecodableType; -} // namespace KeySetReadAllIndicesResponse +} // namespace StayActiveResponse } // namespace Commands namespace Commands { -namespace KeySetWrite { -enum class Fields : uint8_t -{ - kGroupKeySet = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetWrite::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - - Structs::GroupKeySetStruct::Type groupKeySet; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::KeySetWrite::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - - Structs::GroupKeySetStruct::DecodableType groupKeySet; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace KeySetWrite -namespace KeySetRead { +namespace RegisterClient { enum class Fields : uint8_t { - kGroupKeySetID = 0, + kCheckInNodeID = 0, + kMonitoredSubject = 1, + kKey = 2, + kVerificationKey = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - uint16_t groupKeySetID = static_cast(0); + chip::NodeId checkInNodeID = static_cast(0); + uint64_t monitoredSubject = static_cast(0); + chip::ByteSpan key; + Optional verificationKey; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; + using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -13382,27 +13067,30 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - uint16_t groupKeySetID = static_cast(0); + chip::NodeId checkInNodeID = static_cast(0); + uint64_t monitoredSubject = static_cast(0); + chip::ByteSpan key; + Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetRead -namespace KeySetReadResponse { +}; // namespace RegisterClient +namespace RegisterClientResponse { enum class Fields : uint8_t { - kGroupKeySet = 0, + kICDCounter = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetReadResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - Structs::GroupKeySetStruct::Type groupKeySet; + uint32_t ICDCounter = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13414,27 +13102,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetReadResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - Structs::GroupKeySetStruct::DecodableType groupKeySet; + uint32_t ICDCounter = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetReadResponse -namespace KeySetRemove { +}; // namespace RegisterClientResponse +namespace UnregisterClient { enum class Fields : uint8_t { - kGroupKeySetID = 0, + kCheckInNodeID = 0, + kVerificationKey = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - uint16_t groupKeySetID = static_cast(0); + chip::NodeId checkInNodeID = static_cast(0); + Optional verificationKey; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13446,14 +13136,15 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetRemove::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - uint16_t groupKeySetID = static_cast(0); + chip::NodeId checkInNodeID = static_cast(0); + Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetRemove -namespace KeySetReadAllIndices { +}; // namespace UnregisterClient +namespace StayActiveRequest { enum class Fields : uint8_t { }; @@ -13462,12 +13153,12 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -13475,26 +13166,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetReadAllIndices -namespace KeySetReadAllIndicesResponse { +}; // namespace StayActiveRequest +namespace StayActiveResponse { enum class Fields : uint8_t { - kGroupKeySetIDs = 0, + kPromisedActiveDuration = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - DataModel::List groupKeySetIDs; + uint32_t promisedActiveDuration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13506,258 +13197,162 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - DataModel::DecodableList groupKeySetIDs; + uint32_t promisedActiveDuration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetReadAllIndicesResponse +}; // namespace StayActiveResponse } // namespace Commands namespace Attributes { -namespace GroupKeyMap { +namespace IdleModeDuration { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::GroupKeyMap::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GroupKeyMap -namespace GroupTable { +} // namespace IdleModeDuration +namespace ActiveModeDuration { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::GroupTable::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace GroupTable -namespace MaxGroupsPerFabric { +} // namespace ActiveModeDuration +namespace ActiveModeThreshold { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxGroupsPerFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxGroupsPerFabric -namespace MaxGroupKeysPerFabric { +} // namespace ActiveModeThreshold +namespace RegisteredClients { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxGroupKeysPerFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxGroupKeysPerFabric -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } -}; -} // namespace ClusterRevision - +} // namespace RegisteredClients +namespace ICDCounter { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - Attributes::GroupKeyMap::TypeInfo::DecodableType groupKeyMap; - Attributes::GroupTable::TypeInfo::DecodableType groupTable; - Attributes::MaxGroupsPerFabric::TypeInfo::DecodableType maxGroupsPerFabric = static_cast(0); - Attributes::MaxGroupKeysPerFabric::TypeInfo::DecodableType maxGroupKeysPerFabric = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ICDCounter::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace GroupKeyManagement -namespace FixedLabel { -namespace Structs { -namespace LabelStruct = Clusters::detail::Structs::LabelStruct; -} // namespace Structs - -namespace Attributes { - -namespace LabelList { +} // namespace ICDCounter +namespace ClientsSupportedPerFabric { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ClientsSupportedPerFabric::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LabelList -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } -}; -} // namespace ClusterRevision - +} // namespace ClientsSupportedPerFabric +namespace UserActiveModeTriggerHint { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - Attributes::LabelList::TypeInfo::DecodableType labelList; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerHint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace FixedLabel -namespace UserLabel { -namespace Structs { -namespace LabelStruct = Clusters::detail::Structs::LabelStruct; -} // namespace Structs - -namespace Attributes { +} // namespace UserActiveModeTriggerHint +namespace UserActiveModeTriggerInstruction { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; -namespace LabelList { + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerInstruction::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 128; } +}; +} // namespace UserActiveModeTriggerInstruction +namespace OperatingMode { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::Clusters::IcdManagement::OperatingModeEnum; + using DecodableType = chip::app::Clusters::IcdManagement::OperatingModeEnum; + using DecodableArgType = chip::app::Clusters::IcdManagement::OperatingModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperatingMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LabelList +} // namespace OperatingMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace ClusterRevision @@ -13765,11 +13360,21 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LabelList::TypeInfo::DecodableType labelList; + Attributes::IdleModeDuration::TypeInfo::DecodableType idleModeDuration = static_cast(0); + Attributes::ActiveModeDuration::TypeInfo::DecodableType activeModeDuration = static_cast(0); + Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); + Attributes::RegisteredClients::TypeInfo::DecodableType registeredClients; + Attributes::ICDCounter::TypeInfo::DecodableType ICDCounter = static_cast(0); + Attributes::ClientsSupportedPerFabric::TypeInfo::DecodableType clientsSupportedPerFabric = static_cast(0); + Attributes::UserActiveModeTriggerHint::TypeInfo::DecodableType userActiveModeTriggerHint = + static_cast>(0); + Attributes::UserActiveModeTriggerInstruction::TypeInfo::DecodableType userActiveModeTriggerInstruction; + Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -13779,234 +13384,263 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace UserLabel -namespace ProxyConfiguration { - -namespace Attributes { +namespace Events { +namespace OnTransitionToActiveMode { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +} // namespace OnTransitionToActiveMode +} // namespace Events +} // namespace IcdManagement +namespace Timer { -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } +namespace Commands { +// Forward-declarations so we can reference these later. - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +namespace SetTimer { +struct Type; +struct DecodableType; +} // namespace SetTimer - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace ProxyConfiguration -namespace ProxyDiscovery { +namespace ResetTimer { +struct Type; +struct DecodableType; +} // namespace ResetTimer -namespace Attributes { +namespace AddTime { +struct Type; +struct DecodableType; +} // namespace AddTime -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +namespace ReduceTime { +struct Type; +struct DecodableType; +} // namespace ReduceTime + +} // namespace Commands + +namespace Commands { +namespace SetTimer { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } + kNewTime = 0, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t newTime = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t newTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace SetTimer +namespace ResetTimer { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace ProxyDiscovery -namespace ProxyValid { + using ResponseType = DataModel::NullObjectType; -namespace Attributes { + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +}; // namespace ResetTimer +namespace AddTime { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } + kAdditionalTime = 0, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t additionalTime = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t additionalTime = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +}; // namespace AddTime +namespace ReduceTime { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } + kTimeReduction = 0, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + + uint32_t timeReduction = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + uint32_t timeReduction = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace ProxyValid -namespace BooleanState { +}; // namespace ReduceTime +} // namespace Commands namespace Attributes { -namespace StateValue { +namespace SetTime { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StateValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StateValue +} // namespace SetTime +namespace TimeRemaining { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeRemaining::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeRemaining +namespace TimerState { +struct TypeInfo +{ + using Type = chip::app::Clusters::Timer::TimerStatusEnum; + using DecodableType = chip::app::Clusters::Timer::TimerStatusEnum; + using DecodableArgType = chip::app::Clusters::Timer::TimerStatusEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimerState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimerState namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace ClusterRevision @@ -14014,11 +13648,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::StateValue::TypeInfo::DecodableType stateValue = static_cast(0); + Attributes::SetTime::TypeInfo::DecodableType setTime = static_cast(0); + Attributes::TimeRemaining::TypeInfo::DecodableType timeRemaining = static_cast(0); + Attributes::TimerState::TypeInfo::DecodableType timerState = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14028,134 +13664,59 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace StateChange { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t -{ - kStateValue = 0, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - static constexpr bool kIsFabricScoped = false; - - bool stateValue = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::StateChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - - bool stateValue = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace StateChange -} // namespace Events -} // namespace BooleanState -namespace IcdManagement { +} // namespace Timer +namespace OvenCavityOperationalState { namespace Structs { -namespace MonitoringRegistrationStruct { -enum class Fields : uint8_t -{ - kCheckInNodeID = 1, - kMonitoredSubject = 2, - kFabricIndex = 254, -}; - -struct Type -{ -public: - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = true; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } - - CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; - -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; -}; - -using DecodableType = Type; - -} // namespace MonitoringRegistrationStruct +namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; +namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace RegisterClient { +namespace Pause { struct Type; struct DecodableType; -} // namespace RegisterClient +} // namespace Pause -namespace RegisterClientResponse { +namespace Stop { struct Type; struct DecodableType; -} // namespace RegisterClientResponse +} // namespace Stop -namespace UnregisterClient { +namespace Start { struct Type; struct DecodableType; -} // namespace UnregisterClient +} // namespace Start -namespace StayActiveRequest { +namespace Resume { struct Type; struct DecodableType; -} // namespace StayActiveRequest +} // namespace Resume -namespace StayActiveResponse { +namespace OperationalCommandResponse { struct Type; struct DecodableType; -} // namespace StayActiveResponse +} // namespace OperationalCommandResponse } // namespace Commands namespace Commands { -namespace RegisterClient { +namespace Pause { enum class Fields : uint8_t { - kCheckInNodeID = 0, - kMonitoredSubject = 1, - kKey = 2, - kVerificationKey = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - chip::ByteSpan key; - Optional verificationKey; + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14163,34 +13724,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - chip::ByteSpan key; - Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RegisterClient -namespace RegisterClientResponse { +}; // namespace Pause +namespace Stop { enum class Fields : uint8_t { - kICDCounter = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - uint32_t ICDCounter = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14198,33 +13752,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - uint32_t ICDCounter = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RegisterClientResponse -namespace UnregisterClient { +}; // namespace Stop +namespace Start { enum class Fields : uint8_t { - kCheckInNodeID = 0, - kVerificationKey = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - chip::NodeId checkInNodeID = static_cast(0); - Optional verificationKey; + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14232,15 +13780,13 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - chip::NodeId checkInNodeID = static_cast(0); - Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UnregisterClient -namespace StayActiveRequest { +}; // namespace Start +namespace Resume { enum class Fields : uint8_t { }; @@ -14249,12 +13795,12 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14262,26 +13808,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StayActiveRequest -namespace StayActiveResponse { +}; // namespace Resume +namespace OperationalCommandResponse { enum class Fields : uint8_t { - kPromisedActiveDuration = 0, + kCommandResponseState = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - uint32_t promisedActiveDuration = static_cast(0); + Structs::ErrorStateStruct::Type commandResponseState; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14293,162 +13839,126 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - uint32_t promisedActiveDuration = static_cast(0); + Structs::ErrorStateStruct::DecodableType commandResponseState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace StayActiveResponse +}; // namespace OperationalCommandResponse } // namespace Commands namespace Attributes { -namespace IdleModeDuration { +namespace PhaseList { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; + using DecodableArgType = const chip::app::DataModel::Nullable> &; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace IdleModeDuration -namespace ActiveModeDuration { +} // namespace PhaseList +namespace CurrentPhase { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeDuration::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveModeDuration -namespace ActiveModeThreshold { +} // namespace CurrentPhase +namespace CountdownTime { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveModeThreshold -namespace RegisteredClients { +} // namespace CountdownTime +namespace OperationalStateList { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = + chip::app::DataModel::List; using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType>; + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType>; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::IcdManagement::Structs::MonitoringRegistrationStruct::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RegisteredClients -namespace ICDCounter { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ICDCounter::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ICDCounter -namespace ClientsSupportedPerFabric { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ClientsSupportedPerFabric::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ClientsSupportedPerFabric -namespace UserActiveModeTriggerHint { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerHint::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UserActiveModeTriggerHint -namespace UserActiveModeTriggerInstruction { +} // namespace OperationalStateList +namespace OperationalState { struct TypeInfo { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + using Type = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; + using DecodableArgType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerInstruction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 128; } }; -} // namespace UserActiveModeTriggerInstruction -namespace OperatingMode { +} // namespace OperationalState +namespace OperationalError { struct TypeInfo { - using Type = chip::app::Clusters::IcdManagement::OperatingModeEnum; - using DecodableType = chip::app::Clusters::IcdManagement::OperatingModeEnum; - using DecodableArgType = chip::app::Clusters::IcdManagement::OperatingModeEnum; + using Type = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::Type; + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType &; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperatingMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperatingMode +} // namespace OperationalError namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace ClusterRevision @@ -14456,21 +13966,17 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::IdleModeDuration::TypeInfo::DecodableType idleModeDuration = static_cast(0); - Attributes::ActiveModeDuration::TypeInfo::DecodableType activeModeDuration = static_cast(0); - Attributes::ActiveModeThreshold::TypeInfo::DecodableType activeModeThreshold = static_cast(0); - Attributes::RegisteredClients::TypeInfo::DecodableType registeredClients; - Attributes::ICDCounter::TypeInfo::DecodableType ICDCounter = static_cast(0); - Attributes::ClientsSupportedPerFabric::TypeInfo::DecodableType clientsSupportedPerFabric = static_cast(0); - Attributes::UserActiveModeTriggerHint::TypeInfo::DecodableType userActiveModeTriggerHint = - static_cast>(0); - Attributes::UserActiveModeTriggerInstruction::TypeInfo::DecodableType userActiveModeTriggerInstruction; - Attributes::OperatingMode::TypeInfo::DecodableType operatingMode = - static_cast(0); + Attributes::PhaseList::TypeInfo::DecodableType phaseList; + Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; + Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; + Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; + Attributes::OperationalState::TypeInfo::DecodableType operationalState = + static_cast(0); + Attributes::OperationalError::TypeInfo::DecodableType operationalError; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14481,21 +13987,61 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace OnTransitionToActiveMode { +namespace OperationalError { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kErrorState = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr bool kIsFabricScoped = false; + + Structs::ErrorStateStruct::Type errorState; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + Structs::ErrorStateStruct::DecodableType errorState; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace OperationalError +namespace OperationCompletion { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kCompletionErrorCode = 0, + kTotalOperationalTime = 1, + kPausedTime = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr bool kIsFabricScoped = false; + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -14503,60 +14049,58 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OnTransitionToActiveMode +} // namespace OperationCompletion } // namespace Events -} // namespace IcdManagement -namespace Timer { +} // namespace OvenCavityOperationalState +namespace OvenMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace SetTimer { -struct Type; -struct DecodableType; -} // namespace SetTimer - -namespace ResetTimer { -struct Type; -struct DecodableType; -} // namespace ResetTimer - -namespace AddTime { +namespace ChangeToMode { struct Type; struct DecodableType; -} // namespace AddTime +} // namespace ChangeToMode -namespace ReduceTime { +namespace ChangeToModeResponse { struct Type; struct DecodableType; -} // namespace ReduceTime +} // namespace ChangeToModeResponse } // namespace Commands namespace Commands { -namespace SetTimer { +namespace ChangeToMode { enum class Fields : uint8_t { - kNewTime = 0, + kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - uint32_t newTime = static_cast(0); + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14564,24 +14108,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - uint32_t newTime = static_cast(0); + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTimer -namespace ResetTimer { +}; // namespace ChangeToMode +namespace ChangeToModeResponse { enum class Fields : uint8_t { + kStatus = 0, + kStatusText = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14593,150 +14142,190 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ResetTimer -namespace AddTime { -enum class Fields : uint8_t -{ - kAdditionalTime = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +}; // namespace ChangeToModeResponse +} // namespace Commands - uint32_t additionalTime = static_cast(0); +namespace Attributes { - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct DecodableType + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint32_t additionalTime = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace AddTime -namespace ReduceTime { -enum class Fields : uint8_t +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kTimeReduction = 0, + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - - uint32_t timeReduction = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - - uint32_t timeReduction = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; -}; // namespace ReduceTime -} // namespace Commands - -namespace Attributes { +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace ClusterRevision -namespace SetTime { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace SetTime -namespace TimeRemaining { +} // namespace Attributes +} // namespace OvenMode +namespace LaundryDryerControls { + +namespace Attributes { + +namespace SupportedDrynessLevels { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeRemaining::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedDrynessLevels::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimeRemaining -namespace TimerState { +} // namespace SupportedDrynessLevels +namespace SelectedDrynessLevel { struct TypeInfo { - using Type = chip::app::Clusters::Timer::TimerStatusEnum; - using DecodableType = chip::app::Clusters::Timer::TimerStatusEnum; - using DecodableArgType = chip::app::Clusters::Timer::TimerStatusEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimerState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedDrynessLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimerState +} // namespace SelectedDrynessLevel namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; } // namespace ClusterRevision @@ -14744,13 +14333,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SetTime::TypeInfo::DecodableType setTime = static_cast(0); - Attributes::TimeRemaining::TypeInfo::DecodableType timeRemaining = static_cast(0); - Attributes::TimerState::TypeInfo::DecodableType timerState = static_cast(0); + Attributes::SupportedDrynessLevels::TypeInfo::DecodableType supportedDrynessLevels; + Attributes::SelectedDrynessLevel::TypeInfo::DecodableType selectedDrynessLevel; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14760,87 +14348,96 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Timer -namespace OvenCavityOperationalState { +} // namespace LaundryDryerControls +namespace ModeSelect { namespace Structs { -namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; -namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Pause { -struct Type; -struct DecodableType; -} // namespace Pause +namespace SemanticTagStruct { +enum class Fields : uint8_t +{ + kMfgCode = 0, + kValue = 1, +}; -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop +struct Type +{ +public: + chip::VendorId mfgCode = static_cast(0); + uint16_t value = static_cast(0); -namespace Start { -struct Type; -struct DecodableType; -} // namespace Start + CHIP_ERROR Decode(TLV::TLVReader & reader); -namespace Resume { -struct Type; -struct DecodableType; -} // namespace Resume + static constexpr bool kIsFabricScoped = false; -namespace OperationalCommandResponse { -struct Type; -struct DecodableType; -} // namespace OperationalCommandResponse + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; -} // namespace Commands +using DecodableType = Type; -namespace Commands { -namespace Pause { +} // namespace SemanticTagStruct +namespace ModeOptionStruct { enum class Fields : uint8_t { + kLabel = 0, + kMode = 1, + kSemanticTags = 2, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::List semanticTags; - using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::DecodableList semanticTags; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace Pause -namespace Stop { + +} // namespace ModeOptionStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { + kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14848,55 +14445,193 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Stop -namespace Start { -enum class Fields : uint8_t +}; // namespace ChangeToMode +} // namespace Commands + +namespace Attributes { + +namespace Description { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace Description +namespace StandardNamespace { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StandardNamespace::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StandardNamespace +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; +} // namespace ClusterRevision -struct Type +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - static constexpr bool MustUseTimedInvoke() { return false; } + Attributes::Description::TypeInfo::DecodableType description; + Attributes::StandardNamespace::TypeInfo::DecodableType standardNamespace; + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; +} // namespace Attributes +} // namespace ModeSelect +namespace LaundryWasherMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } +namespace Commands { +// Forward-declarations so we can reference these later. - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Start -namespace Resume { +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { + kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14904,26 +14639,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Resume -namespace OperationalCommandResponse { +}; // namespace ChangeToMode +namespace ChangeToModeResponse { enum class Fields : uint8_t { - kCommandResponseState = 0, + kStatus = 0, + kStatusText = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - Structs::ErrorStateStruct::Type commandResponseState; + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14935,229 +14673,128 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - Structs::ErrorStateStruct::DecodableType commandResponseState; + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OperationalCommandResponse +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { -namespace PhaseList { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; - using DecodableArgType = const chip::app::DataModel::Nullable> &; - - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PhaseList -namespace CurrentPhase { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentPhase -namespace CountdownTime { +namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CountdownTime -namespace OperationalStateList { +} // namespace SupportedModes +namespace CurrentMode { struct TypeInfo { - using Type = - chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OvenCavityOperationalState::Structs::OperationalStateStruct::DecodableType> &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalStateList -namespace OperationalState { +} // namespace CurrentMode +namespace StartUpMode { struct TypeInfo { - using Type = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; - using DecodableType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; - using DecodableArgType = chip::app::Clusters::OvenCavityOperationalState::OperationalStateEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalState -namespace OperationalError { +} // namespace StartUpMode +namespace OnMode { struct TypeInfo { - using Type = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::Type; - using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::OvenCavityOperationalState::Structs::ErrorStateStruct::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalError +} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::PhaseList::TypeInfo::DecodableType phaseList; - Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; - Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; - Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState = - static_cast(0); - Attributes::OperationalError::TypeInfo::DecodableType operationalError; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -namespace Events { -namespace OperationalError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - -enum class Fields : uint8_t -{ - kErrorState = 0, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr bool kIsFabricScoped = false; - - Structs::ErrorStateStruct::Type errorState; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - Structs::ErrorStateStruct::DecodableType errorState; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; -} // namespace OperationalError -namespace OperationCompletion { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - kCompletionErrorCode = 0, - kTotalOperationalTime = 1, - kPausedTime = 2, + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; - -struct Type +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - static constexpr bool kIsFabricScoped = false; - - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - CHIP_ERROR Decode(TLV::TLVReader & reader); + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace OperationCompletion -} // namespace Events -} // namespace OvenCavityOperationalState -namespace OvenMode { +} // namespace Attributes +} // namespace LaundryWasherMode +namespace RefrigeratorAndTemperatureControlledCabinetMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; @@ -15190,13 +14827,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15205,7 +14842,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15223,7 +14860,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15239,7 +14876,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15253,13 +14890,14 @@ namespace Attributes { namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List< + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::Type>; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15271,7 +14909,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15283,7 +14921,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15295,7 +14933,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15303,37 +14941,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace ClusterRevision @@ -15341,7 +14979,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -15358,151 +14996,124 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OvenMode -namespace LaundryDryerControls { +} // namespace RefrigeratorAndTemperatureControlledCabinetMode +namespace LaundryWasherControls { namespace Attributes { -namespace SupportedDrynessLevels { +namespace SpinSpeeds { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedDrynessLevels::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedDrynessLevels -namespace SelectedDrynessLevel { +} // namespace SpinSpeeds +namespace SpinSpeedCurrent { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SelectedDrynessLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SelectedDrynessLevel +} // namespace SpinSpeedCurrent +namespace NumberOfRinses { +struct TypeInfo +{ + using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfRinses +namespace SupportedRinses { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedRinses namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace ClusterRevision -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::SupportedDrynessLevels::TypeInfo::DecodableType supportedDrynessLevels; - Attributes::SelectedDrynessLevel::TypeInfo::DecodableType selectedDrynessLevel; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace LaundryDryerControls -namespace ModeSelect { -namespace Structs { -namespace SemanticTagStruct { -enum class Fields : uint8_t -{ - kMfgCode = 0, - kValue = 1, -}; - -struct Type -{ -public: - chip::VendorId mfgCode = static_cast(0); - uint16_t value = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; - -} // namespace SemanticTagStruct -namespace ModeOptionStruct { -enum class Fields : uint8_t -{ - kLabel = 0, - kMode = 1, - kSemanticTags = 2, -}; - -struct Type -{ -public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::List semanticTags; - - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::DecodableList semanticTags; - - CHIP_ERROR Decode(TLV::TLVReader & reader); +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr bool kIsFabricScoped = false; -}; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); -} // namespace ModeOptionStruct + Attributes::SpinSpeeds::TypeInfo::DecodableType spinSpeeds; + Attributes::SpinSpeedCurrent::TypeInfo::DecodableType spinSpeedCurrent; + Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses = + static_cast(0); + Attributes::SupportedRinses::TypeInfo::DecodableType supportedRinses; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace LaundryWasherControls +namespace RvcRunMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; } // namespace Structs namespace Commands { @@ -15513,6 +15124,11 @@ struct Type; struct DecodableType; } // namespace ChangeToMode +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse + } // namespace Commands namespace Commands { @@ -15527,13 +15143,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15542,51 +15158,61 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ChangeToMode -} // namespace Commands - -namespace Attributes { +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; -namespace Description { -struct TypeInfo +struct Type { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Description -namespace StandardNamespace { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StandardNamespace::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace StandardNamespace +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; + chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15598,23 +15224,11 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace StartUpMode { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode namespace OnMode { struct TypeInfo { @@ -15622,7 +15236,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15630,37 +15244,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } }; } // namespace ClusterRevision @@ -15668,15 +15282,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Description::TypeInfo::DecodableType description; - Attributes::StandardNamespace::TypeInfo::DecodableType standardNamespace; Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -15687,8 +15298,8 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ModeSelect -namespace LaundryWasherMode { +} // namespace RvcRunMode +namespace RvcCleanMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; @@ -15721,13 +15332,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15736,7 +15347,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15754,7 +15365,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15770,7 +15381,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15784,13 +15395,13 @@ namespace Attributes { namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15802,23 +15413,11 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode -namespace StartUpMode { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode namespace OnMode { struct TypeInfo { @@ -15826,7 +15425,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15834,37 +15433,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } }; } // namespace ClusterRevision @@ -15872,13 +15471,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -15889,77 +15487,36 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LaundryWasherMode -namespace RefrigeratorAndTemperatureControlledCabinetMode { -namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs +} // namespace RvcCleanMode +namespace TemperatureControl { namespace Commands { // Forward-declarations so we can reference these later. -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -namespace ChangeToModeResponse { +namespace SetTemperature { struct Type; struct DecodableType; -} // namespace ChangeToModeResponse +} // namespace SetTemperature } // namespace Commands namespace Commands { -namespace ChangeToMode { -enum class Fields : uint8_t -{ - kNewMode = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - - uint8_t newMode = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - - uint8_t newMode = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { +namespace SetTemperature { enum class Fields : uint8_t { - kStatus = 0, - kStatusText = 1, + kTargetTemperature = 0, + kTargetTemperatureLevel = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - uint8_t status = static_cast(0); - Optional statusText; + Optional targetTemperature; + Optional targetTemperatureLevel; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -15970,104 +15527,125 @@ struct Type struct DecodableType { -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - uint8_t status = static_cast(0); - Optional statusText; + Optional targetTemperature; + Optional targetTemperatureLevel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToModeResponse +}; // namespace SetTemperature } // namespace Commands namespace Attributes { -namespace SupportedModes { +namespace TemperatureSetpoint { struct TypeInfo { - using Type = chip::app::DataModel::List< - const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::Type>; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> &; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedModes -namespace CurrentMode { +} // namespace TemperatureSetpoint +namespace MinTemperature { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentMode -namespace StartUpMode { +} // namespace MinTemperature +namespace MaxTemperature { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxTemperature::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StartUpMode -namespace OnMode { +} // namespace MaxTemperature +namespace Step { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OnMode +} // namespace Step +namespace SelectedTemperatureLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedTemperatureLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SelectedTemperatureLevel +namespace SupportedTemperatureLevels { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedTemperatureLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedTemperatureLevels namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; } // namespace ClusterRevision @@ -16075,14 +15653,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; - Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); + Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); + Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); + Attributes::Step::TypeInfo::DecodableType step = static_cast(0); + Attributes::SelectedTemperatureLevel::TypeInfo::DecodableType selectedTemperatureLevel = static_cast(0); + Attributes::SupportedTemperatureLevels::TypeInfo::DecodableType supportedTemperatureLevels; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -16092,94 +15672,81 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace LaundryWasherControls { +} // namespace TemperatureControl +namespace RefrigeratorAlarm { namespace Attributes { -namespace SpinSpeeds { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; - - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SpinSpeeds -namespace SpinSpeedCurrent { +namespace Mask { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SpinSpeedCurrent -namespace NumberOfRinses { +} // namespace Mask +namespace State { struct TypeInfo { - using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfRinses -namespace SupportedRinses { +} // namespace State +namespace Supported { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedRinses +} // namespace Supported namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace ClusterRevision @@ -16187,15 +15754,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SpinSpeeds::TypeInfo::DecodableType spinSpeeds; - Attributes::SpinSpeedCurrent::TypeInfo::DecodableType spinSpeedCurrent; - Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses = - static_cast(0); - Attributes::SupportedRinses::TypeInfo::DecodableType supportedRinses; + Attributes::Mask::TypeInfo::DecodableType mask = + static_cast>(0); + Attributes::State::TypeInfo::DecodableType state = + static_cast>(0); + Attributes::Supported::TypeInfo::DecodableType supported = + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -16205,8 +15773,52 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LaundryWasherControls -namespace RvcRunMode { +namespace Events { +namespace Notify { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kActive = 0, + kInactive = 1, + kState = 2, + kMask = 3, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Notify +} // namespace Events +} // namespace RefrigeratorAlarm +namespace DishwasherMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; @@ -16239,13 +15851,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -16254,7 +15866,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -16272,7 +15884,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -16288,7 +15900,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -16302,13 +15914,13 @@ namespace Attributes { namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; + chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16320,11 +15932,23 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode namespace OnMode { struct TypeInfo { @@ -16332,7 +15956,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16340,37 +15964,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace ClusterRevision @@ -16378,12 +16002,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; Attributes::OnMode::TypeInfo::DecodableType onMode; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -16394,47 +16019,108 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace RvcRunMode -namespace RvcCleanMode { -namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs +} // namespace DishwasherMode +namespace AirQuality { + +namespace Attributes { + +namespace AirQuality { +struct TypeInfo +{ + using Type = chip::app::Clusters::AirQuality::AirQualityEnum; + using DecodableType = chip::app::Clusters::AirQuality::AirQualityEnum; + using DecodableArgType = chip::app::Clusters::AirQuality::AirQualityEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AirQuality::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AirQuality +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::AirQuality::TypeInfo::DecodableType airQuality = + static_cast(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace AirQuality +namespace SmokeCoAlarm { namespace Commands { // Forward-declarations so we can reference these later. -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -namespace ChangeToModeResponse { +namespace SelfTestRequest { struct Type; struct DecodableType; -} // namespace ChangeToModeResponse +} // namespace SelfTestRequest } // namespace Commands namespace Commands { -namespace ChangeToMode { +namespace SelfTestRequest { enum class Fields : uint8_t { - kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - - uint8_t newMode = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::SelfTestRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -16442,124 +16128,206 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelfTestRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { -enum class Fields : uint8_t +}; // namespace SelfTestRequest +} // namespace Commands + +namespace Attributes { + +namespace ExpressedState { +struct TypeInfo { - kStatus = 0, - kStatusText = 1, + using Type = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ExpressedState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace ExpressedState +namespace SmokeState { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SmokeState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SmokeState +namespace COState { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - uint8_t status = static_cast(0); - Optional statusText; + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::COState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace COState +namespace BatteryAlert { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BatteryAlert::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BatteryAlert +namespace DeviceMuted { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DeviceMuted::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DeviceMuted +namespace TestInProgress { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TestInProgress::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TestInProgress +namespace HardwareFaultAlert { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareFaultAlert::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace HardwareFaultAlert +namespace EndOfServiceAlert { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndOfServiceAlert::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace EndOfServiceAlert +namespace InterconnectSmokeAlarm { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectSmokeAlarm::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace InterconnectSmokeAlarm +namespace InterconnectCOAlarm { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - uint8_t status = static_cast(0); - Optional statusText; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectCOAlarm::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ChangeToModeResponse -} // namespace Commands - -namespace Attributes { - -namespace SupportedModes { +} // namespace InterconnectCOAlarm +namespace ContaminationState { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ContaminationState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedModes -namespace CurrentMode { +} // namespace ContaminationState +namespace SmokeSensitivityLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SmokeSensitivityLevel::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentMode -namespace OnMode { +} // namespace SmokeSensitivityLevel +namespace ExpiryDate { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ExpiryDate::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OnMode +} // namespace ExpiryDate namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace ClusterRevision @@ -16567,13 +16335,32 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::ExpressedState::TypeInfo::DecodableType expressedState = + static_cast(0); + Attributes::SmokeState::TypeInfo::DecodableType smokeState = + static_cast(0); + Attributes::COState::TypeInfo::DecodableType COState = static_cast(0); + Attributes::BatteryAlert::TypeInfo::DecodableType batteryAlert = + static_cast(0); + Attributes::DeviceMuted::TypeInfo::DecodableType deviceMuted = + static_cast(0); + Attributes::TestInProgress::TypeInfo::DecodableType testInProgress = static_cast(0); + Attributes::HardwareFaultAlert::TypeInfo::DecodableType hardwareFaultAlert = static_cast(0); + Attributes::EndOfServiceAlert::TypeInfo::DecodableType endOfServiceAlert = + static_cast(0); + Attributes::InterconnectSmokeAlarm::TypeInfo::DecodableType interconnectSmokeAlarm = + static_cast(0); + Attributes::InterconnectCOAlarm::TypeInfo::DecodableType interconnectCOAlarm = + static_cast(0); + Attributes::ContaminationState::TypeInfo::DecodableType contaminationState = + static_cast(0); + Attributes::SmokeSensitivityLevel::TypeInfo::DecodableType smokeSensitivityLevel = + static_cast(0); + Attributes::ExpiryDate::TypeInfo::DecodableType expiryDate = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -16583,317 +16370,327 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace RvcCleanMode -namespace TemperatureControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace SetTemperature { -struct Type; -struct DecodableType; -} // namespace SetTemperature - -} // namespace Commands +namespace Events { +namespace SmokeAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Commands { -namespace SetTemperature { enum class Fields : uint8_t { - kTargetTemperature = 0, - kTargetTemperatureLevel = 1, + kAlarmSeverityLevel = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; - Optional targetTemperature; - Optional targetTemperatureLevel; + AlarmStateEnum alarmSeverityLevel = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + AlarmStateEnum alarmSeverityLevel = static_cast(0); - Optional targetTemperature; - Optional targetTemperatureLevel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTemperature -} // namespace Commands +} // namespace SmokeAlarm +namespace COAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Attributes { +enum class Fields : uint8_t +{ + kAlarmSeverityLevel = 0, +}; -namespace TemperatureSetpoint { -struct TypeInfo +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::COAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace TemperatureSetpoint -namespace MinTemperature { -struct TypeInfo + +struct DecodableType { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::COAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MinTemperature -namespace MaxTemperature { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +} // namespace COAlarm +namespace LowBattery { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ + kAlarmSeverityLevel = 0, }; -} // namespace MaxTemperature -namespace Step { -struct TypeInfo + +struct Type { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LowBattery::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Step -namespace SelectedTemperatureLevel { -struct TypeInfo + +struct DecodableType { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::LowBattery::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace LowBattery +namespace HardwareFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SelectedTemperatureLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace SelectedTemperatureLevel -namespace SupportedTemperatureLevels { -struct TypeInfo + +struct Type { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::HardwareFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedTemperatureLevels::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace SupportedTemperatureLevels -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::HardwareFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace HardwareFault +namespace EndOfService { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::EndOfService::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::EndOfService::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace EndOfService +namespace SelfTestComplete { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SelfTestComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SelfTestComplete::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - Attributes::TemperatureSetpoint::TypeInfo::DecodableType temperatureSetpoint = static_cast(0); - Attributes::MinTemperature::TypeInfo::DecodableType minTemperature = static_cast(0); - Attributes::MaxTemperature::TypeInfo::DecodableType maxTemperature = static_cast(0); - Attributes::Step::TypeInfo::DecodableType step = static_cast(0); - Attributes::SelectedTemperatureLevel::TypeInfo::DecodableType selectedTemperatureLevel = static_cast(0); - Attributes::SupportedTemperatureLevels::TypeInfo::DecodableType supportedTemperatureLevels; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace TemperatureControl -namespace RefrigeratorAlarm { +} // namespace SelfTestComplete +namespace AlarmMuted { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Attributes { +enum class Fields : uint8_t +{ +}; -namespace Mask { -struct TypeInfo +struct Type { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmMuted::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Mask -namespace State { -struct TypeInfo + +struct DecodableType { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmMuted::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace State -namespace Supported { -struct TypeInfo +} // namespace AlarmMuted +namespace MuteEnded { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +}; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MuteEnded::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Supported -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MuteEnded::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace MuteEnded +namespace InterconnectSmokeAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + kAlarmSeverityLevel = 0, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::InterconnectSmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::InterconnectSmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace InterconnectSmokeAlarm +namespace InterconnectCOAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + kAlarmSeverityLevel = 0, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::InterconnectCOAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + AlarmStateEnum alarmSeverityLevel = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::InterconnectCOAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + AlarmStateEnum alarmSeverityLevel = static_cast(0); - Attributes::Mask::TypeInfo::DecodableType mask = - static_cast>(0); - Attributes::State::TypeInfo::DecodableType state = - static_cast>(0); - Attributes::Supported::TypeInfo::DecodableType supported = - static_cast>(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -namespace Events { -namespace Notify { +} // namespace InterconnectCOAlarm +namespace AllClear { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kActive = 0, - kInactive = 1, - kState = 2, - kMask = 3, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr EventId GetEventId() { return Events::AllClear::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } static constexpr bool kIsFabricScoped = false; - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -16901,59 +16698,50 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); + static constexpr EventId GetEventId() { return Events::AllClear::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Notify +} // namespace AllClear } // namespace Events -} // namespace RefrigeratorAlarm -namespace DishwasherMode { -namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs +} // namespace SmokeCoAlarm +namespace DishwasherAlarm { namespace Commands { // Forward-declarations so we can reference these later. -namespace ChangeToMode { +namespace Reset { struct Type; struct DecodableType; -} // namespace ChangeToMode +} // namespace Reset -namespace ChangeToModeResponse { +namespace ModifyEnabledAlarms { struct Type; struct DecodableType; -} // namespace ChangeToModeResponse +} // namespace ModifyEnabledAlarms } // namespace Commands namespace Commands { -namespace ChangeToMode { +namespace Reset { enum class Fields : uint8_t { - kNewMode = 0, + kAlarms = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - uint8_t newMode = static_cast(0); + chip::BitMask alarms = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -16961,29 +16749,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - uint8_t newMode = static_cast(0); + chip::BitMask alarms = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { +}; // namespace Reset +namespace ModifyEnabledAlarms { enum class Fields : uint8_t { - kStatus = 0, - kStatusText = 1, + kMask = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - uint8_t status = static_cast(0); - Optional statusText; + chip::BitMask mask = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -16995,102 +16781,99 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - uint8_t status = static_cast(0); - Optional statusText; + chip::BitMask mask = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToModeResponse +}; // namespace ModifyEnabledAlarms } // namespace Commands namespace Attributes { -namespace SupportedModes { +namespace Mask { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedModes -namespace CurrentMode { +} // namespace Mask +namespace Latch { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Latch::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentMode -namespace StartUpMode { +} // namespace Latch +namespace State { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace StartUpMode -namespace OnMode { +} // namespace State +namespace Supported { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OnMode +} // namespace Supported namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; } // namespace ClusterRevision @@ -17098,14 +16881,18 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; - Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::Mask::TypeInfo::DecodableType mask = + static_cast>(0); + Attributes::Latch::TypeInfo::DecodableType latch = + static_cast>(0); + Attributes::State::TypeInfo::DecodableType state = + static_cast>(0); + Attributes::Supported::TypeInfo::DecodableType supported = + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -17115,57 +16902,119 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace DishwasherMode -namespace AirQuality { +namespace Events { +namespace Notify { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kActive = 0, + kInactive = 1, + kState = 2, + kMask = 3, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Notify +} // namespace Events +} // namespace DishwasherAlarm +namespace MicrowaveOvenMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs namespace Attributes { -namespace AirQuality { +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::MicrowaveOvenMode::Structs::ModeOptionStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { struct TypeInfo { - using Type = chip::app::Clusters::AirQuality::AirQualityEnum; - using DecodableType = chip::app::Clusters::AirQuality::AirQualityEnum; - using DecodableArgType = chip::app::Clusters::AirQuality::AirQualityEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AirQuality +} // namespace CurrentMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } }; } // namespace ClusterRevision @@ -17173,12 +17022,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::AirQuality::TypeInfo::DecodableType airQuality = - static_cast(0); + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -17188,31 +17037,43 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace AirQuality -namespace SmokeCoAlarm { +} // namespace MicrowaveOvenMode +namespace MicrowaveOvenControl { namespace Commands { // Forward-declarations so we can reference these later. -namespace SelfTestRequest { +namespace SetCookingParameters { struct Type; struct DecodableType; -} // namespace SelfTestRequest +} // namespace SetCookingParameters + +namespace AddMoreTime { +struct Type; +struct DecodableType; +} // namespace AddMoreTime } // namespace Commands namespace Commands { -namespace SelfTestRequest { +namespace SetCookingParameters { enum class Fields : uint8_t { + kCookMode = 0, + kCookTime = 1, + kPowerSetting = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SelfTestRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetCookingParameters::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + + Optional cookMode; + Optional cookTime; + Optional powerSetting; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -17224,206 +17085,145 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SelfTestRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetCookingParameters::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + Optional cookMode; + Optional cookTime; + Optional powerSetting; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SelfTestRequest -} // namespace Commands - -namespace Attributes { - -namespace ExpressedState { -struct TypeInfo +}; // namespace SetCookingParameters +namespace AddMoreTime { +enum class Fields : uint8_t { - using Type = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum; - - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ExpressedState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kTimeToAdd = 0, }; -} // namespace ExpressedState -namespace SmokeState { -struct TypeInfo -{ - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SmokeState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SmokeState -namespace COState { -struct TypeInfo +struct Type { - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::AddMoreTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::COState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace COState -namespace BatteryAlert { -struct TypeInfo -{ - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + uint32_t timeToAdd = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BatteryAlert::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BatteryAlert -namespace DeviceMuted { -struct TypeInfo -{ - using Type = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DeviceMuted::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DeviceMuted -namespace TestInProgress { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TestInProgress::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace TestInProgress -namespace HardwareFaultAlert { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareFaultAlert::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace HardwareFaultAlert -namespace EndOfServiceAlert { -struct TypeInfo +struct DecodableType { - using Type = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::AddMoreTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EndOfServiceAlert::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint32_t timeToAdd = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EndOfServiceAlert -namespace InterconnectSmokeAlarm { +}; // namespace AddMoreTime +} // namespace Commands + +namespace Attributes { + +namespace CookTime { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectSmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CookTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InterconnectSmokeAlarm -namespace InterconnectCOAlarm { +} // namespace CookTime +namespace PowerSetting { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectCOAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PowerSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InterconnectCOAlarm -namespace ContaminationState { +} // namespace PowerSetting +namespace MinPower { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ContaminationState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ContaminationState -namespace SmokeSensitivityLevel { +} // namespace MinPower +namespace MaxPower { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::SensitivityEnum; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SmokeSensitivityLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SmokeSensitivityLevel -namespace ExpiryDate { +} // namespace MaxPower +namespace PowerStep { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ExpiryDate::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PowerStep::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ExpiryDate +} // namespace PowerStep namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } }; } // namespace ClusterRevision @@ -17431,32 +17231,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::ExpressedState::TypeInfo::DecodableType expressedState = - static_cast(0); - Attributes::SmokeState::TypeInfo::DecodableType smokeState = - static_cast(0); - Attributes::COState::TypeInfo::DecodableType COState = static_cast(0); - Attributes::BatteryAlert::TypeInfo::DecodableType batteryAlert = - static_cast(0); - Attributes::DeviceMuted::TypeInfo::DecodableType deviceMuted = - static_cast(0); - Attributes::TestInProgress::TypeInfo::DecodableType testInProgress = static_cast(0); - Attributes::HardwareFaultAlert::TypeInfo::DecodableType hardwareFaultAlert = static_cast(0); - Attributes::EndOfServiceAlert::TypeInfo::DecodableType endOfServiceAlert = - static_cast(0); - Attributes::InterconnectSmokeAlarm::TypeInfo::DecodableType interconnectSmokeAlarm = - static_cast(0); - Attributes::InterconnectCOAlarm::TypeInfo::DecodableType interconnectCOAlarm = - static_cast(0); - Attributes::ContaminationState::TypeInfo::DecodableType contaminationState = - static_cast(0); - Attributes::SmokeSensitivityLevel::TypeInfo::DecodableType smokeSensitivityLevel = - static_cast(0); - Attributes::ExpiryDate::TypeInfo::DecodableType expiryDate = static_cast(0); + Attributes::CookTime::TypeInfo::DecodableType cookTime = static_cast(0); + Attributes::PowerSetting::TypeInfo::DecodableType powerSetting = static_cast(0); + Attributes::MinPower::TypeInfo::DecodableType minPower = static_cast(0); + Attributes::MaxPower::TypeInfo::DecodableType maxPower = static_cast(0); + Attributes::PowerStep::TypeInfo::DecodableType powerStep = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -17466,177 +17249,346 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace SmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace MicrowaveOvenControl +namespace OperationalState { +namespace Structs { +namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; +namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Pause { +struct Type; +struct DecodableType; +} // namespace Pause + +namespace Stop { +struct Type; +struct DecodableType; +} // namespace Stop + +namespace Start { +struct Type; +struct DecodableType; +} // namespace Start + +namespace Resume { +struct Type; +struct DecodableType; +} // namespace Resume + +namespace OperationalCommandResponse { +struct Type; +struct DecodableType; +} // namespace OperationalCommandResponse + +} // namespace Commands +namespace Commands { +namespace Pause { enum class Fields : uint8_t { - kAlarmSeverityLevel = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Pause +namespace Stop { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Stop +namespace Start { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SmokeAlarm -namespace COAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +}; // namespace Start +namespace Resume { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Resume +namespace OperationalCommandResponse { enum class Fields : uint8_t { - kAlarmSeverityLevel = 0, + kCommandResponseState = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::COAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + Structs::ErrorStateStruct::Type commandResponseState; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::COAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + Structs::ErrorStateStruct::DecodableType commandResponseState; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace OperationalCommandResponse +} // namespace Commands + +namespace Attributes { + +namespace PhaseList { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; + using DecodableArgType = const chip::app::DataModel::Nullable> &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhaseList +namespace CurrentPhase { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPhase +namespace CountdownTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CountdownTime +namespace OperationalStateList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> &; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace COAlarm -namespace LowBattery { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace OperationalStateList +namespace OperationalState { +struct TypeInfo { - kAlarmSeverityLevel = 0, -}; + using Type = chip::app::Clusters::OperationalState::OperationalStateEnum; + using DecodableType = chip::app::Clusters::OperationalState::OperationalStateEnum; + using DecodableArgType = chip::app::Clusters::OperationalState::OperationalStateEnum; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OperationalState +namespace OperationalError { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LowBattery::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; - - AlarmStateEnum alarmSeverityLevel = static_cast(0); + using Type = chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type; + using DecodableType = chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace OperationalError +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::LowBattery::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - - AlarmStateEnum alarmSeverityLevel = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; -} // namespace LowBattery -namespace HardwareFault { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; - -struct Type +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::HardwareFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; - -struct DecodableType +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::HardwareFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; -} // namespace HardwareFault -namespace EndOfService { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; - -struct Type +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::EndOfService::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::EndOfService::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::PhaseList::TypeInfo::DecodableType phaseList; + Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; + Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; + Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; + Attributes::OperationalState::TypeInfo::DecodableType operationalState = + static_cast(0); + Attributes::OperationalError::TypeInfo::DecodableType operationalError; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; }; -} // namespace EndOfService -namespace SelfTestComplete { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace Attributes +namespace Events { +namespace OperationalError { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { + kErrorState = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SelfTestComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } static constexpr bool kIsFabricScoped = false; + Structs::ErrorStateStruct::Type errorState; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -17644,27 +17596,36 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SelfTestComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + + Structs::ErrorStateStruct::DecodableType errorState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SelfTestComplete -namespace AlarmMuted { +} // namespace OperationalError +namespace OperationCompletion { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { + kCompletionErrorCode = 0, + kTotalOperationalTime = 1, + kPausedTime = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AlarmMuted::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } static constexpr bool kIsFabricScoped = false; + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -17672,109 +17633,112 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AlarmMuted::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AlarmMuted -namespace MuteEnded { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace OperationCompletion +} // namespace Events +} // namespace OperationalState +namespace RvcOperationalState { +namespace Structs { +namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; +namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; +} // namespace Structs -enum class Fields : uint8_t -{ -}; +namespace Commands { +// Forward-declarations so we can reference these later. -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MuteEnded::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; +namespace Pause { +struct Type; +struct DecodableType; +} // namespace Pause - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; +namespace Stop { +struct Type; +struct DecodableType; +} // namespace Stop -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MuteEnded::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } +namespace Start { +struct Type; +struct DecodableType; +} // namespace Start - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace MuteEnded -namespace InterconnectSmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +namespace Resume { +struct Type; +struct DecodableType; +} // namespace Resume + +namespace OperationalCommandResponse { +struct Type; +struct DecodableType; +} // namespace OperationalCommandResponse +} // namespace Commands + +namespace Commands { +namespace Pause { enum class Fields : uint8_t { - kAlarmSeverityLevel = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InterconnectSmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InterconnectSmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - - AlarmStateEnum alarmSeverityLevel = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InterconnectSmokeAlarm -namespace InterconnectCOAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +}; // namespace Pause +namespace Stop { enum class Fields : uint8_t { - kAlarmSeverityLevel = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InterconnectCOAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; - - AlarmStateEnum alarmSeverityLevel = static_cast(0); + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::InterconnectCOAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - - AlarmStateEnum alarmSeverityLevel = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InterconnectCOAlarm -namespace AllClear { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace Stop +namespace Start { enum class Fields : uint8_t { }; @@ -17782,62 +17746,41 @@ enum class Fields : uint8_t struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AllClear::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AllClear::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AllClear -} // namespace Events -} // namespace SmokeCoAlarm -namespace DishwasherAlarm { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Reset { -struct Type; -struct DecodableType; -} // namespace Reset - -namespace ModifyEnabledAlarms { -struct Type; -struct DecodableType; -} // namespace ModifyEnabledAlarms - -} // namespace Commands - -namespace Commands { -namespace Reset { +}; // namespace Start +namespace Resume { enum class Fields : uint8_t { - kAlarms = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - - chip::BitMask alarms = static_cast>(0); + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -17845,27 +17788,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - chip::BitMask alarms = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Reset -namespace ModifyEnabledAlarms { +}; // namespace Resume +namespace OperationalCommandResponse { enum class Fields : uint8_t { - kMask = 0, + kCommandResponseState = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - chip::BitMask mask = static_cast>(0); + Structs::ErrorStateStruct::Type commandResponseState; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -17877,99 +17819,125 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - chip::BitMask mask = static_cast>(0); + Structs::ErrorStateStruct::DecodableType commandResponseState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ModifyEnabledAlarms +}; // namespace OperationalCommandResponse } // namespace Commands namespace Attributes { -namespace Mask { +namespace PhaseList { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::Nullable>; + using DecodableType = chip::app::DataModel::Nullable>; + using DecodableArgType = const chip::app::DataModel::Nullable> &; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Mask -namespace Latch { +} // namespace PhaseList +namespace CurrentPhase { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Latch::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Latch -namespace State { +} // namespace CurrentPhase +namespace CountdownTime { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace State -namespace Supported { +} // namespace CountdownTime +namespace OperationalStateList { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Supported +} // namespace OperationalStateList +namespace OperationalState { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OperationalState +namespace OperationalError { +struct TypeInfo +{ + using Type = chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::Type; + using DecodableType = chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType &; + + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OperationalError namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace ClusterRevision @@ -17977,51 +17945,80 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::PhaseList::TypeInfo::DecodableType phaseList; + Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; + Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; + Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; + Attributes::OperationalState::TypeInfo::DecodableType operationalState = static_cast(0); + Attributes::OperationalError::TypeInfo::DecodableType operationalError; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace OperationalError { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t +{ + kErrorState = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr bool kIsFabricScoped = false; + + Structs::ErrorStateStruct::Type errorState; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Structs::ErrorStateStruct::DecodableType errorState; - Attributes::Mask::TypeInfo::DecodableType mask = - static_cast>(0); - Attributes::Latch::TypeInfo::DecodableType latch = - static_cast>(0); - Attributes::State::TypeInfo::DecodableType state = - static_cast>(0); - Attributes::Supported::TypeInfo::DecodableType supported = - static_cast>(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -namespace Events { -namespace Notify { +} // namespace OperationalError +namespace OperationCompletion { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kActive = 0, - kInactive = 1, - kState = 2, - kMask = 3, + kCompletionErrorCode = 0, + kTotalOperationalTime = 1, + kPausedTime = 2, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } static constexpr bool kIsFabricScoped = false; - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -18030,150 +18027,241 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Notify::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = static_cast>(0); + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Notify +} // namespace OperationCompletion } // namespace Events -} // namespace DishwasherAlarm -namespace MicrowaveOvenMode { +} // namespace RvcOperationalState +namespace ScenesManagement { namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs - -namespace Attributes { - -namespace SupportedModes { -struct TypeInfo +namespace AttributeValuePair { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::MicrowaveOvenMode::Structs::ModeOptionStruct::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kAttributeID = 0, + kAttributeValue = 1, }; -} // namespace SupportedModes -namespace CurrentMode { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentMode -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } +public: + chip::AttributeId attributeID = static_cast(0); + uint32_t attributeValue = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +using DecodableType = Type; + +} // namespace AttributeValuePair +namespace ExtensionFieldSet { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + kClusterID = 0, + kAttributeValueList = 1, }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } +public: + chip::ClusterId clusterID = static_cast(0); + DataModel::List attributeValueList; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } +public: + chip::ClusterId clusterID = static_cast(0); + DataModel::DecodableList attributeValueList; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +} // namespace ExtensionFieldSet +namespace SceneInfoStruct { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + kSceneCount = 0, + kCurrentScene = 1, + kCurrentGroup = 2, + kSceneValid = 3, + kRemainingCapacity = 4, + kFabricIndex = 254, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } +public: + uint8_t sceneCount = static_cast(0); + uint8_t currentScene = static_cast(0); + chip::GroupId currentGroup = static_cast(0); + bool sceneValid = static_cast(0); + uint8_t remainingCapacity = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -} // namespace ClusterRevision -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } +using DecodableType = Type; + +} // namespace SceneInfoStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace AddScene { +struct Type; +struct DecodableType; +} // namespace AddScene + +namespace AddSceneResponse { +struct Type; +struct DecodableType; +} // namespace AddSceneResponse + +namespace ViewScene { +struct Type; +struct DecodableType; +} // namespace ViewScene + +namespace ViewSceneResponse { +struct Type; +struct DecodableType; +} // namespace ViewSceneResponse + +namespace RemoveScene { +struct Type; +struct DecodableType; +} // namespace RemoveScene + +namespace RemoveSceneResponse { +struct Type; +struct DecodableType; +} // namespace RemoveSceneResponse + +namespace RemoveAllScenes { +struct Type; +struct DecodableType; +} // namespace RemoveAllScenes + +namespace RemoveAllScenesResponse { +struct Type; +struct DecodableType; +} // namespace RemoveAllScenesResponse + +namespace StoreScene { +struct Type; +struct DecodableType; +} // namespace StoreScene + +namespace StoreSceneResponse { +struct Type; +struct DecodableType; +} // namespace StoreSceneResponse + +namespace RecallScene { +struct Type; +struct DecodableType; +} // namespace RecallScene + +namespace GetSceneMembership { +struct Type; +struct DecodableType; +} // namespace GetSceneMembership + +namespace GetSceneMembershipResponse { +struct Type; +struct DecodableType; +} // namespace GetSceneMembershipResponse + +namespace EnhancedAddScene { +struct Type; +struct DecodableType; +} // namespace EnhancedAddScene - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +namespace EnhancedAddSceneResponse { +struct Type; +struct DecodableType; +} // namespace EnhancedAddSceneResponse - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace MicrowaveOvenMode -namespace MicrowaveOvenControl { +namespace EnhancedViewScene { +struct Type; +struct DecodableType; +} // namespace EnhancedViewScene -namespace Commands { -// Forward-declarations so we can reference these later. +namespace EnhancedViewSceneResponse { +struct Type; +struct DecodableType; +} // namespace EnhancedViewSceneResponse -namespace SetCookingParameters { +namespace CopyScene { struct Type; struct DecodableType; -} // namespace SetCookingParameters +} // namespace CopyScene -namespace AddMoreTime { +namespace CopySceneResponse { struct Type; struct DecodableType; -} // namespace AddMoreTime +} // namespace CopySceneResponse } // namespace Commands namespace Commands { -namespace SetCookingParameters { +namespace AddScene { enum class Fields : uint8_t { - kCookMode = 0, - kCookTime = 1, - kPowerSetting = 2, + kGroupID = 0, + kSceneID = 1, + kTransitionTime = 2, + kSceneName = 3, + kExtensionFieldSets = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetCookingParameters::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Optional cookMode; - Optional cookTime; - Optional powerSetting; + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::CharSpan sceneName; + DataModel::List extensionFieldSets; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18181,29 +18269,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetCookingParameters::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Optional cookMode; - Optional cookTime; - Optional powerSetting; + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::CharSpan sceneName; + DataModel::DecodableList extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetCookingParameters -namespace AddMoreTime { +}; // namespace AddScene +namespace AddSceneResponse { enum class Fields : uint8_t { - kTimeToAdd = 0, + kStatus = 0, + kGroupID = 1, + kSceneID = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::AddMoreTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - uint32_t timeToAdd = static_cast(0); + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -18215,189 +18309,78 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AddMoreTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - uint32_t timeToAdd = static_cast(0); + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddMoreTime -} // namespace Commands - -namespace Attributes { - -namespace CookTime { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CookTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CookTime -namespace PowerSetting { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerSetting::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerSetting -namespace MinPower { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinPower -namespace MaxPower { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxPower -namespace PowerStep { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerStep::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerStep -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace AddSceneResponse +namespace ViewScene { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + kGroupID = 0, + kSceneID = 1, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::CookTime::TypeInfo::DecodableType cookTime = static_cast(0); - Attributes::PowerSetting::TypeInfo::DecodableType powerSetting = static_cast(0); - Attributes::MinPower::TypeInfo::DecodableType minPower = static_cast(0); - Attributes::MaxPower::TypeInfo::DecodableType maxPower = static_cast(0); - Attributes::PowerStep::TypeInfo::DecodableType powerStep = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace MicrowaveOvenControl -namespace OperationalState { -namespace Structs { -namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; -namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace Pause { -struct Type; -struct DecodableType; -} // namespace Pause +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); -namespace Start { -struct Type; -struct DecodableType; -} // namespace Start + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Resume { -struct Type; -struct DecodableType; -} // namespace Resume + using ResponseType = Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType; -namespace OperationalCommandResponse { -struct Type; -struct DecodableType; -} // namespace OperationalCommandResponse + static constexpr bool MustUseTimedInvoke() { return false; } +}; -} // namespace Commands +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ViewScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } -namespace Commands { -namespace Pause { + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ViewScene +namespace ViewSceneResponse { enum class Fields : uint8_t { + kStatus = 0, + kGroupID = 1, + kSceneID = 2, + kTransitionTime = 3, + kSceneName = 4, + kExtensionFieldSets = 5, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional transitionTime; + Optional sceneName; + Optional> extensionFieldSets; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18405,27 +18388,38 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::ViewSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional transitionTime; + Optional sceneName; + Optional> extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Pause -namespace Stop { +}; // namespace ViewSceneResponse +namespace RemoveScene { enum class Fields : uint8_t { + kGroupID = 0, + kSceneID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18433,27 +18427,36 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Stop -namespace Start { +}; // namespace RemoveScene +namespace RemoveSceneResponse { enum class Fields : uint8_t { + kStatus = 0, + kGroupID = 1, + kSceneID = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18461,27 +18464,33 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Start -namespace Resume { +}; // namespace RemoveSceneResponse +namespace RemoveAllScenes { enum class Fields : uint8_t { + kGroupID = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18489,26 +18498,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Resume -namespace OperationalCommandResponse { +}; // namespace RemoveAllScenes +namespace RemoveAllScenesResponse { enum class Fields : uint8_t { - kCommandResponseState = 0, + kStatus = 0, + kGroupID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Structs::ErrorStateStruct::Type commandResponseState; + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -18520,279 +18532,264 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Structs::ErrorStateStruct::DecodableType commandResponseState; + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OperationalCommandResponse -} // namespace Commands - -namespace Attributes { - -namespace PhaseList { -struct TypeInfo +}; // namespace RemoveAllScenesResponse +namespace StoreScene { +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; - using DecodableArgType = const chip::app::DataModel::Nullable> &; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kGroupID = 0, + kSceneID = 1, }; -} // namespace PhaseList -namespace CurrentPhase { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentPhase -namespace CountdownTime { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CountdownTime -namespace OperationalStateList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> &; + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OperationalStateList -namespace OperationalState { -struct TypeInfo -{ - using Type = chip::app::Clusters::OperationalState::OperationalStateEnum; - using DecodableType = chip::app::Clusters::OperationalState::OperationalStateEnum; - using DecodableArgType = chip::app::Clusters::OperationalState::OperationalStateEnum; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OperationalState -namespace OperationalError { -struct TypeInfo -{ - using Type = chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::Type; - using DecodableType = chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::OperationalState::Structs::ErrorStateStruct::DecodableType &; + using ResponseType = Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OperationalError -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::StoreScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace StoreScene +namespace StoreSceneResponse { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + kStatus = 0, + kGroupID = 1, + kSceneID = 2, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::StoreSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace StoreSceneResponse +namespace RecallScene { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } + kGroupID = 0, + kSceneID = 1, + kTransitionTime = 2, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional> transitionTime; - Attributes::PhaseList::TypeInfo::DecodableType phaseList; - Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; - Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; - Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState = - static_cast(0); - Attributes::OperationalError::TypeInfo::DecodableType operationalError; - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -namespace Events { -namespace OperationalError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional> transitionTime; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace RecallScene +namespace GetSceneMembership { enum class Fields : uint8_t { - kErrorState = 0, + kGroupID = 0, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Structs::ErrorStateStruct::Type errorState; + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - - Structs::ErrorStateStruct::DecodableType errorState; + static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OperationalError -namespace OperationCompletion { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace GetSceneMembership +namespace GetSceneMembershipResponse { enum class Fields : uint8_t { - kCompletionErrorCode = 0, - kTotalOperationalTime = 1, - kPausedTime = 2, + kStatus = 0, + kCapacity = 1, + kGroupID = 2, + kSceneList = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr bool kIsFabricScoped = false; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; + uint8_t status = static_cast(0); + DataModel::Nullable capacity; + chip::GroupId groupID = static_cast(0); + Optional> sceneList; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; + static constexpr CommandId GetCommandId() { return Commands::GetSceneMembershipResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + uint8_t status = static_cast(0); + DataModel::Nullable capacity; + chip::GroupId groupID = static_cast(0); + Optional> sceneList; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OperationCompletion -} // namespace Events -} // namespace OperationalState -namespace RvcOperationalState { -namespace Structs { -namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; -namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. +}; // namespace GetSceneMembershipResponse +namespace EnhancedAddScene { +enum class Fields : uint8_t +{ + kGroupID = 0, + kSceneID = 1, + kTransitionTime = 2, + kSceneName = 3, + kExtensionFieldSets = 4, +}; -namespace Pause { -struct Type; -struct DecodableType; -} // namespace Pause +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } -namespace Stop { -struct Type; -struct DecodableType; -} // namespace Stop + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::CharSpan sceneName; + DataModel::List extensionFieldSets; -namespace Start { -struct Type; -struct DecodableType; -} // namespace Start + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace Resume { -struct Type; -struct DecodableType; -} // namespace Resume + using ResponseType = Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType; -namespace OperationalCommandResponse { -struct Type; -struct DecodableType; -} // namespace OperationalCommandResponse + static constexpr bool MustUseTimedInvoke() { return false; } +}; -} // namespace Commands +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } -namespace Commands { -namespace Pause { + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + uint16_t transitionTime = static_cast(0); + chip::CharSpan sceneName; + DataModel::DecodableList extensionFieldSets; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace EnhancedAddScene +namespace EnhancedAddSceneResponse { enum class Fields : uint8_t { + kStatus = 0, + kGroupID = 1, + kSceneID = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18800,27 +18797,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedAddSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Pause -namespace Stop { +}; // namespace EnhancedAddSceneResponse +namespace EnhancedViewScene { enum class Fields : uint8_t { + kGroupID = 0, + kSceneID = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18828,27 +18833,42 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Stop -namespace Start { +}; // namespace EnhancedViewScene +namespace EnhancedViewSceneResponse { enum class Fields : uint8_t { + kStatus = 0, + kGroupID = 1, + kSceneID = 2, + kTransitionTime = 3, + kSceneName = 4, + kExtensionFieldSets = 5, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional transitionTime; + Optional sceneName; + Optional> extensionFieldSets; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18856,27 +18876,44 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Start::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::EnhancedViewSceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); + Optional transitionTime; + Optional sceneName; + Optional> extensionFieldSets; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Start -namespace Resume { +}; // namespace EnhancedViewSceneResponse +namespace CopyScene { enum class Fields : uint8_t { + kMode = 0, + kGroupIdentifierFrom = 1, + kSceneIdentifierFrom = 2, + kGroupIdentifierTo = 3, + kSceneIdentifierTo = 4, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + + chip::BitMask mode = static_cast>(0); + chip::GroupId groupIdentifierFrom = static_cast(0); + uint8_t sceneIdentifierFrom = static_cast(0); + chip::GroupId groupIdentifierTo = static_cast(0); + uint8_t sceneIdentifierTo = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + using ResponseType = Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18884,26 +18921,35 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::CopyScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + chip::BitMask mode = static_cast>(0); + chip::GroupId groupIdentifierFrom = static_cast(0); + uint8_t sceneIdentifierFrom = static_cast(0); + chip::GroupId groupIdentifierTo = static_cast(0); + uint8_t sceneIdentifierTo = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace Resume -namespace OperationalCommandResponse { +}; // namespace CopyScene +namespace CopySceneResponse { enum class Fields : uint8_t { - kCommandResponseState = 0, + kStatus = 0, + kGroupIdentifierFrom = 1, + kSceneIdentifierFrom = 2, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Structs::ErrorStateStruct::Type commandResponseState; + uint8_t status = static_cast(0); + chip::GroupId groupIdentifierFrom = static_cast(0); + uint8_t sceneIdentifierFrom = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -18915,125 +18961,151 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - Structs::ErrorStateStruct::DecodableType commandResponseState; + uint8_t status = static_cast(0); + chip::GroupId groupIdentifierFrom = static_cast(0); + uint8_t sceneIdentifierFrom = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OperationalCommandResponse +}; // namespace CopySceneResponse } // namespace Commands namespace Attributes { -namespace PhaseList { +namespace SceneCount { struct TypeInfo { - using Type = chip::app::DataModel::Nullable>; - using DecodableType = chip::app::DataModel::Nullable>; - using DecodableArgType = const chip::app::DataModel::Nullable> &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SceneCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhaseList -namespace CurrentPhase { +} // namespace SceneCount +namespace CurrentScene { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentScene::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPhase -namespace CountdownTime { +} // namespace CurrentScene +namespace CurrentGroup { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::GroupId; + using DecodableType = chip::GroupId; + using DecodableArgType = chip::GroupId; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentGroup::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CountdownTime -namespace OperationalStateList { +} // namespace CurrentGroup +namespace SceneValid { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SceneValid::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalStateList -namespace OperationalState { +} // namespace SceneValid +namespace NameSupport { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NameSupport::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalState -namespace OperationalError { +} // namespace NameSupport +namespace LastConfiguredBy { struct TypeInfo { - using Type = chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::Type; - using DecodableType = chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType; - using DecodableArgType = const chip::app::Clusters::RvcOperationalState::Structs::ErrorStateStruct::DecodableType &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LastConfiguredBy::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalError +} // namespace LastConfiguredBy +namespace SceneTableSize { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SceneTableSize::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SceneTableSize +namespace FabricSceneInfo { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FabricSceneInfo::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace FabricSceneInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } }; } // namespace ClusterRevision @@ -19041,16 +19113,19 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PhaseList::TypeInfo::DecodableType phaseList; - Attributes::CurrentPhase::TypeInfo::DecodableType currentPhase; - Attributes::CountdownTime::TypeInfo::DecodableType countdownTime; - Attributes::OperationalStateList::TypeInfo::DecodableType operationalStateList; - Attributes::OperationalState::TypeInfo::DecodableType operationalState = static_cast(0); - Attributes::OperationalError::TypeInfo::DecodableType operationalError; + Attributes::SceneCount::TypeInfo::DecodableType sceneCount = static_cast(0); + Attributes::CurrentScene::TypeInfo::DecodableType currentScene = static_cast(0); + Attributes::CurrentGroup::TypeInfo::DecodableType currentGroup = static_cast(0); + Attributes::SceneValid::TypeInfo::DecodableType sceneValid = static_cast(0); + Attributes::NameSupport::TypeInfo::DecodableType nameSupport = + static_cast>(0); + Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy; + Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); + Attributes::FabricSceneInfo::TypeInfo::DecodableType fabricSceneInfo; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -19060,81 +19135,7 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace OperationalError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - -enum class Fields : uint8_t -{ - kErrorState = 0, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr bool kIsFabricScoped = false; - - Structs::ErrorStateStruct::Type errorState; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - Structs::ErrorStateStruct::DecodableType errorState; - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace OperationalError -namespace OperationCompletion { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t -{ - kCompletionErrorCode = 0, - kTotalOperationalTime = 1, - kPausedTime = 2, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - static constexpr bool kIsFabricScoped = false; - - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - uint8_t completionErrorCode = static_cast(0); - Optional> totalOperationalTime; - Optional> pausedTime; - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace OperationCompletion -} // namespace Events -} // namespace RvcOperationalState +} // namespace ScenesManagement namespace HepaFilterMonitoring { namespace Structs { namespace ReplacementProductStruct { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index e037b879154ce4..395b091e4add5e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -127,68 +127,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace Groups -namespace Scenes { -namespace Attributes { - -namespace SceneCount { -static constexpr AttributeId Id = 0x00000000; -} // namespace SceneCount - -namespace CurrentScene { -static constexpr AttributeId Id = 0x00000001; -} // namespace CurrentScene - -namespace CurrentGroup { -static constexpr AttributeId Id = 0x00000002; -} // namespace CurrentGroup - -namespace SceneValid { -static constexpr AttributeId Id = 0x00000003; -} // namespace SceneValid - -namespace NameSupport { -static constexpr AttributeId Id = 0x00000004; -} // namespace NameSupport - -namespace LastConfiguredBy { -static constexpr AttributeId Id = 0x00000005; -} // namespace LastConfiguredBy - -namespace SceneTableSize { -static constexpr AttributeId Id = 0x00000006; -} // namespace SceneTableSize - -namespace FabricSceneInfo { -static constexpr AttributeId Id = 0x00000007; -} // namespace FabricSceneInfo - -namespace GeneratedCommandList { -static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; -} // namespace GeneratedCommandList - -namespace AcceptedCommandList { -static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; -} // namespace AcceptedCommandList - -namespace EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - -namespace AttributeList { -static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; -} // namespace AttributeList - -namespace FeatureMap { -static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; -} // namespace FeatureMap - -namespace ClusterRevision { -static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Scenes - namespace OnOff { namespace Attributes { @@ -3409,6 +3347,68 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace RvcOperationalState +namespace ScenesManagement { +namespace Attributes { + +namespace SceneCount { +static constexpr AttributeId Id = 0x00000000; +} // namespace SceneCount + +namespace CurrentScene { +static constexpr AttributeId Id = 0x00000001; +} // namespace CurrentScene + +namespace CurrentGroup { +static constexpr AttributeId Id = 0x00000002; +} // namespace CurrentGroup + +namespace SceneValid { +static constexpr AttributeId Id = 0x00000003; +} // namespace SceneValid + +namespace NameSupport { +static constexpr AttributeId Id = 0x00000004; +} // namespace NameSupport + +namespace LastConfiguredBy { +static constexpr AttributeId Id = 0x00000005; +} // namespace LastConfiguredBy + +namespace SceneTableSize { +static constexpr AttributeId Id = 0x00000006; +} // namespace SceneTableSize + +namespace FabricSceneInfo { +static constexpr AttributeId Id = 0x00000007; +} // namespace FabricSceneInfo + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ScenesManagement + namespace HepaFilterMonitoring { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 32a8b316847eee..22c0372ff8208b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -31,9 +31,6 @@ static constexpr ClusterId Id = 0x00000003; namespace Groups { static constexpr ClusterId Id = 0x00000004; } // namespace Groups -namespace Scenes { -static constexpr ClusterId Id = 0x00000005; -} // namespace Scenes namespace OnOff { static constexpr ClusterId Id = 0x00000006; } // namespace OnOff @@ -208,6 +205,9 @@ static constexpr ClusterId Id = 0x00000060; namespace RvcOperationalState { static constexpr ClusterId Id = 0x00000061; } // namespace RvcOperationalState +namespace ScenesManagement { +static constexpr ClusterId Id = 0x00000062; +} // namespace ScenesManagement namespace HepaFilterMonitoring { static constexpr ClusterId Id = 0x00000071; } // namespace HepaFilterMonitoring diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 68a889ebfe7e19..46626e62f0751e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -87,88 +87,6 @@ static constexpr CommandId Id = 0x00000005; } // namespace Commands } // namespace Groups -namespace Scenes { -namespace Commands { - -namespace AddScene { -static constexpr CommandId Id = 0x00000000; -} // namespace AddScene - -namespace AddSceneResponse { -static constexpr CommandId Id = 0x00000000; -} // namespace AddSceneResponse - -namespace ViewScene { -static constexpr CommandId Id = 0x00000001; -} // namespace ViewScene - -namespace ViewSceneResponse { -static constexpr CommandId Id = 0x00000001; -} // namespace ViewSceneResponse - -namespace RemoveScene { -static constexpr CommandId Id = 0x00000002; -} // namespace RemoveScene - -namespace RemoveSceneResponse { -static constexpr CommandId Id = 0x00000002; -} // namespace RemoveSceneResponse - -namespace RemoveAllScenes { -static constexpr CommandId Id = 0x00000003; -} // namespace RemoveAllScenes - -namespace RemoveAllScenesResponse { -static constexpr CommandId Id = 0x00000003; -} // namespace RemoveAllScenesResponse - -namespace StoreScene { -static constexpr CommandId Id = 0x00000004; -} // namespace StoreScene - -namespace StoreSceneResponse { -static constexpr CommandId Id = 0x00000004; -} // namespace StoreSceneResponse - -namespace RecallScene { -static constexpr CommandId Id = 0x00000005; -} // namespace RecallScene - -namespace GetSceneMembership { -static constexpr CommandId Id = 0x00000006; -} // namespace GetSceneMembership - -namespace GetSceneMembershipResponse { -static constexpr CommandId Id = 0x00000006; -} // namespace GetSceneMembershipResponse - -namespace EnhancedAddScene { -static constexpr CommandId Id = 0x00000040; -} // namespace EnhancedAddScene - -namespace EnhancedAddSceneResponse { -static constexpr CommandId Id = 0x00000040; -} // namespace EnhancedAddSceneResponse - -namespace EnhancedViewScene { -static constexpr CommandId Id = 0x00000041; -} // namespace EnhancedViewScene - -namespace EnhancedViewSceneResponse { -static constexpr CommandId Id = 0x00000041; -} // namespace EnhancedViewSceneResponse - -namespace CopyScene { -static constexpr CommandId Id = 0x00000042; -} // namespace CopyScene - -namespace CopySceneResponse { -static constexpr CommandId Id = 0x00000042; -} // namespace CopySceneResponse - -} // namespace Commands -} // namespace Scenes - namespace OnOff { namespace Commands { @@ -893,6 +811,88 @@ static constexpr CommandId Id = 0x00000004; } // namespace Commands } // namespace RvcOperationalState +namespace ScenesManagement { +namespace Commands { + +namespace AddScene { +static constexpr CommandId Id = 0x00000000; +} // namespace AddScene + +namespace AddSceneResponse { +static constexpr CommandId Id = 0x00000000; +} // namespace AddSceneResponse + +namespace ViewScene { +static constexpr CommandId Id = 0x00000001; +} // namespace ViewScene + +namespace ViewSceneResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace ViewSceneResponse + +namespace RemoveScene { +static constexpr CommandId Id = 0x00000002; +} // namespace RemoveScene + +namespace RemoveSceneResponse { +static constexpr CommandId Id = 0x00000002; +} // namespace RemoveSceneResponse + +namespace RemoveAllScenes { +static constexpr CommandId Id = 0x00000003; +} // namespace RemoveAllScenes + +namespace RemoveAllScenesResponse { +static constexpr CommandId Id = 0x00000003; +} // namespace RemoveAllScenesResponse + +namespace StoreScene { +static constexpr CommandId Id = 0x00000004; +} // namespace StoreScene + +namespace StoreSceneResponse { +static constexpr CommandId Id = 0x00000004; +} // namespace StoreSceneResponse + +namespace RecallScene { +static constexpr CommandId Id = 0x00000005; +} // namespace RecallScene + +namespace GetSceneMembership { +static constexpr CommandId Id = 0x00000006; +} // namespace GetSceneMembership + +namespace GetSceneMembershipResponse { +static constexpr CommandId Id = 0x00000006; +} // namespace GetSceneMembershipResponse + +namespace EnhancedAddScene { +static constexpr CommandId Id = 0x00000040; +} // namespace EnhancedAddScene + +namespace EnhancedAddSceneResponse { +static constexpr CommandId Id = 0x00000040; +} // namespace EnhancedAddSceneResponse + +namespace EnhancedViewScene { +static constexpr CommandId Id = 0x00000041; +} // namespace EnhancedViewScene + +namespace EnhancedViewSceneResponse { +static constexpr CommandId Id = 0x00000041; +} // namespace EnhancedViewSceneResponse + +namespace CopyScene { +static constexpr CommandId Id = 0x00000042; +} // namespace CopyScene + +namespace CopySceneResponse { +static constexpr CommandId Id = 0x00000042; +} // namespace CopySceneResponse + +} // namespace Commands +} // namespace ScenesManagement + namespace HepaFilterMonitoring { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index fa4778a1438519..ff759011ffad1c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -38,12 +38,6 @@ #define CHIP_PRINTCLUSTER_GROUPS_CLUSTER #endif -#if defined(ZCL_USING_SCENES_CLUSTER_SERVER) || defined(ZCL_USING_SCENES_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_SCENES_CLUSTER { chip::app::Clusters::Scenes::Id, "Scenes" }, -#else -#define CHIP_PRINTCLUSTER_SCENES_CLUSTER -#endif - #if defined(ZCL_USING_ON_OFF_CLUSTER_SERVER) || defined(ZCL_USING_ON_OFF_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_ON_OFF_CLUSTER { chip::app::Clusters::OnOff::Id, "On/Off" }, #else @@ -413,6 +407,12 @@ #define CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER #endif +#if defined(ZCL_USING_SCENES_CLUSTER_SERVER) || defined(ZCL_USING_SCENES_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_SCENES_CLUSTER { chip::app::Clusters::ScenesManagement::Id, "Scenes Management" }, +#else +#define CHIP_PRINTCLUSTER_SCENES_CLUSTER +#endif + #if defined(ZCL_USING_HEPA_FILTER_MONITORING_CLUSTER_SERVER) || defined(ZCL_USING_HEPA_FILTER_MONITORING_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ { chip::app::Clusters::HepaFilterMonitoring::Id, "HEPA Filter Monitoring" }, @@ -768,7 +768,6 @@ #define CLUSTER_IDS_TO_NAMES \ CHIP_PRINTCLUSTER_IDENTIFY_CLUSTER \ CHIP_PRINTCLUSTER_GROUPS_CLUSTER \ - CHIP_PRINTCLUSTER_SCENES_CLUSTER \ CHIP_PRINTCLUSTER_ON_OFF_CLUSTER \ CHIP_PRINTCLUSTER_ON_OFF_SWITCH_CONFIGURATION_CLUSTER \ CHIP_PRINTCLUSTER_LEVEL_CONTROL_CLUSTER \ @@ -827,6 +826,7 @@ CHIP_PRINTCLUSTER_MICROWAVE_OVEN_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER \ + CHIP_PRINTCLUSTER_SCENES_CLUSTER \ CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CONFIGURATION_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 32806d60b968e9..f90d86b9afbc57 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -37,7 +37,6 @@ |---------------------------------------------------------------------+--------| | Identify | 0x0003 | | Groups | 0x0004 | -| Scenes | 0x0005 | | OnOff | 0x0006 | | OnOffSwitchConfiguration | 0x0007 | | LevelControl | 0x0008 | @@ -96,6 +95,7 @@ | MicrowaveOvenControl | 0x005F | | OperationalState | 0x0060 | | RvcOperationalState | 0x0061 | +| ScenesManagement | 0x0062 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | | BooleanStateConfiguration | 0x0080 | @@ -495,29 +495,22 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand }; /*----------------------------------------------------------------------------*\ -| Cluster Scenes | 0x0005 | +| Cluster OnOff | 0x0006 | |------------------------------------------------------------------------------| | Commands: | | -| * AddScene | 0x00 | -| * ViewScene | 0x01 | -| * RemoveScene | 0x02 | -| * RemoveAllScenes | 0x03 | -| * StoreScene | 0x04 | -| * RecallScene | 0x05 | -| * GetSceneMembership | 0x06 | -| * EnhancedAddScene | 0x40 | -| * EnhancedViewScene | 0x41 | -| * CopyScene | 0x42 | +| * Off | 0x00 | +| * On | 0x01 | +| * Toggle | 0x02 | +| * OffWithEffect | 0x40 | +| * OnWithRecallGlobalScene | 0x41 | +| * OnWithTimedOff | 0x42 | |------------------------------------------------------------------------------| | Attributes: | | -| * SceneCount | 0x0000 | -| * CurrentScene | 0x0001 | -| * CurrentGroup | 0x0002 | -| * SceneValid | 0x0003 | -| * NameSupport | 0x0004 | -| * LastConfiguredBy | 0x0005 | -| * SceneTableSize | 0x0006 | -| * FabricSceneInfo | 0x0007 | +| * OnOff | 0x0000 | +| * GlobalSceneControl | 0x4000 | +| * OnTime | 0x4001 | +| * OffWaitTime | 0x4002 | +| * StartUpOnOff | 0x4003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -529,26 +522,20 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command AddScene + * Command Off */ -class ScenesAddScene : public ClusterCommand +class OnOffOff : public ClusterCommand { public: - ScenesAddScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + OnOffOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -557,8 +544,8 @@ class ScenesAddScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -567,28 +554,24 @@ class ScenesAddScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::AddScene::Type mRequest; - TypedComplexArgument> - mComplex_ExtensionFieldSets; + chip::app::Clusters::OnOff::Commands::Off::Type mRequest; }; /* - * Command ViewScene + * Command On */ -class ScenesViewScene : public ClusterCommand +class OnOffOn : public ClusterCommand { public: - ScenesViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-scene", credsIssuerConfig) + OnOffOn(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -597,8 +580,8 @@ class ScenesViewScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -607,26 +590,24 @@ class ScenesViewScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::ViewScene::Type mRequest; + chip::app::Clusters::OnOff::Commands::On::Type mRequest; }; /* - * Command RemoveScene + * Command Toggle */ -class ScenesRemoveScene : public ClusterCommand +class OnOffToggle : public ClusterCommand { public: - ScenesRemoveScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-scene", credsIssuerConfig) + OnOffToggle(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("toggle", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -635,8 +616,8 @@ class ScenesRemoveScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -645,25 +626,26 @@ class ScenesRemoveScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::RemoveScene::Type mRequest; + chip::app::Clusters::OnOff::Commands::Toggle::Type mRequest; }; /* - * Command RemoveAllScenes + * Command OffWithEffect */ -class ScenesRemoveAllScenes : public ClusterCommand +class OnOffOffWithEffect : public ClusterCommand { public: - ScenesRemoveAllScenes(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-scenes", credsIssuerConfig) + OnOffOffWithEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off-with-effect", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); + AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -672,8 +654,8 @@ class ScenesRemoveAllScenes : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -682,26 +664,25 @@ class ScenesRemoveAllScenes : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type mRequest; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; }; /* - * Command StoreScene + * Command OnWithRecallGlobalScene */ -class ScenesStoreScene : public ClusterCommand +class OnOffOnWithRecallGlobalScene : public ClusterCommand { public: - ScenesStoreScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("store-scene", credsIssuerConfig) + OnOffOnWithRecallGlobalScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("on-with-recall-global-scene", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -710,8 +691,8 @@ class ScenesStoreScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -720,27 +701,27 @@ class ScenesStoreScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::StoreScene::Type mRequest; + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type mRequest; }; /* - * Command RecallScene + * Command OnWithTimedOff */ -class ScenesRecallScene : public ClusterCommand +class OnOffOnWithTimedOff : public ClusterCommand { public: - ScenesRecallScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("recall-scene", credsIssuerConfig) + OnOffOnWithTimedOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on-with-timed-off", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); + AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); + AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -749,8 +730,8 @@ class ScenesRecallScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -759,26 +740,85 @@ class ScenesRecallScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::RecallScene::Type mRequest; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OnOffSwitchConfiguration | 0x0007 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SwitchType | 0x0000 | +| * SwitchActions | 0x0010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster LevelControl | 0x0008 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToLevel | 0x00 | +| * Move | 0x01 | +| * Step | 0x02 | +| * Stop | 0x03 | +| * MoveToLevelWithOnOff | 0x04 | +| * MoveWithOnOff | 0x05 | +| * StepWithOnOff | 0x06 | +| * StopWithOnOff | 0x07 | +| * MoveToClosestFrequency | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentLevel | 0x0000 | +| * RemainingTime | 0x0001 | +| * MinLevel | 0x0002 | +| * MaxLevel | 0x0003 | +| * CurrentFrequency | 0x0004 | +| * MinFrequency | 0x0005 | +| * MaxFrequency | 0x0006 | +| * Options | 0x000F | +| * OnOffTransitionTime | 0x0010 | +| * OnLevel | 0x0011 | +| * OnTransitionTime | 0x0012 | +| * OffTransitionTime | 0x0013 | +| * DefaultMoveRate | 0x0014 | +| * StartUpCurrentLevel | 0x4000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command GetSceneMembership + * Command MoveToLevel */ -class ScenesGetSceneMembership : public ClusterCommand +class LevelControlMoveToLevel : public ClusterCommand { public: - ScenesGetSceneMembership(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-scene-membership", credsIssuerConfig) + LevelControlMoveToLevel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-level", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -787,8 +827,8 @@ class ScenesGetSceneMembership : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -797,30 +837,28 @@ class ScenesGetSceneMembership : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type mRequest; + chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type mRequest; }; /* - * Command EnhancedAddScene + * Command Move */ -class ScenesEnhancedAddScene : public ClusterCommand +class LevelControlMove : public ClusterCommand { public: - ScenesEnhancedAddScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enhanced-add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + LevelControlMove(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -829,8 +867,8 @@ class ScenesEnhancedAddScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -839,28 +877,29 @@ class ScenesEnhancedAddScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type mRequest; - TypedComplexArgument> - mComplex_ExtensionFieldSets; + chip::app::Clusters::LevelControl::Commands::Move::Type mRequest; }; /* - * Command EnhancedViewScene + * Command Step */ -class ScenesEnhancedViewScene : public ClusterCommand +class LevelControlStep : public ClusterCommand { public: - ScenesEnhancedViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enhanced-view-scene", credsIssuerConfig) + LevelControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -869,8 +908,8 @@ class ScenesEnhancedViewScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -879,29 +918,26 @@ class ScenesEnhancedViewScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type mRequest; + chip::app::Clusters::LevelControl::Commands::Step::Type mRequest; }; /* - * Command CopyScene + * Command Stop */ -class ScenesCopyScene : public ClusterCommand +class LevelControlStop : public ClusterCommand { public: - ScenesCopyScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("copy-scene", credsIssuerConfig) + LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); - AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); - AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); - AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -910,8 +946,8 @@ class ScenesCopyScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -920,51 +956,29 @@ class ScenesCopyScene : public ClusterCommand } private: - chip::app::Clusters::Scenes::Commands::CopyScene::Type mRequest; + chip::app::Clusters::LevelControl::Commands::Stop::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster OnOff | 0x0006 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Off | 0x00 | -| * On | 0x01 | -| * Toggle | 0x02 | -| * OffWithEffect | 0x40 | -| * OnWithRecallGlobalScene | 0x41 | -| * OnWithTimedOff | 0x42 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OnOff | 0x0000 | -| * GlobalSceneControl | 0x4000 | -| * OnTime | 0x4001 | -| * OffWaitTime | 0x4002 | -| * StartUpOnOff | 0x4003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Off + * Command MoveToLevelWithOnOff */ -class OnOffOff : public ClusterCommand +class LevelControlMoveToLevelWithOnOff : public ClusterCommand { public: - OnOffOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off", credsIssuerConfig) + LevelControlMoveToLevelWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-level-with-on-off", credsIssuerConfig) { + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -973,8 +987,8 @@ class OnOffOff : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -983,24 +997,28 @@ class OnOffOff : public ClusterCommand } private: - chip::app::Clusters::OnOff::Commands::Off::Type mRequest; + chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type mRequest; }; /* - * Command On + * Command MoveWithOnOff */ -class OnOffOn : public ClusterCommand +class LevelControlMoveWithOnOff : public ClusterCommand { public: - OnOffOn(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on", credsIssuerConfig) + LevelControlMoveWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-with-on-off", credsIssuerConfig) { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1009,8 +1027,8 @@ class OnOffOn : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1019,24 +1037,29 @@ class OnOffOn : public ClusterCommand } private: - chip::app::Clusters::OnOff::Commands::On::Type mRequest; + chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type mRequest; }; /* - * Command Toggle + * Command StepWithOnOff */ -class OnOffToggle : public ClusterCommand +class LevelControlStepWithOnOff : public ClusterCommand { public: - OnOffToggle(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("toggle", credsIssuerConfig) + LevelControlStepWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-with-on-off", credsIssuerConfig) { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1045,8 +1068,8 @@ class OnOffToggle : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1055,26 +1078,26 @@ class OnOffToggle : public ClusterCommand } private: - chip::app::Clusters::OnOff::Commands::Toggle::Type mRequest; + chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type mRequest; }; /* - * Command OffWithEffect + * Command StopWithOnOff */ -class OnOffOffWithEffect : public ClusterCommand +class LevelControlStopWithOnOff : public ClusterCommand { public: - OnOffOffWithEffect(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("off-with-effect", credsIssuerConfig) + LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) { - AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); - AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1083,8 +1106,8 @@ class OnOffOffWithEffect : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1093,25 +1116,26 @@ class OnOffOffWithEffect : public ClusterCommand } private: - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; }; /* - * Command OnWithRecallGlobalScene + * Command MoveToClosestFrequency */ -class OnOffOnWithRecallGlobalScene : public ClusterCommand +class LevelControlMoveToClosestFrequency : public ClusterCommand { public: - OnOffOnWithRecallGlobalScene(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("on-with-recall-global-scene", credsIssuerConfig) + LevelControlMoveToClosestFrequency(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("move-to-closest-frequency", credsIssuerConfig) { + AddArgument("Frequency", 0, UINT16_MAX, &mRequest.frequency); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1120,8 +1144,8 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1130,56 +1154,40 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand } private: - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type mRequest; + chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type mRequest; }; -/* - * Command OnWithTimedOff - */ -class OnOffOnWithTimedOff : public ClusterCommand -{ -public: - OnOffOnWithTimedOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("on-with-timed-off", credsIssuerConfig) - { - AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); - AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); - AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster BinaryInputBasic | 0x000F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveText | 0x0004 | +| * Description | 0x001C | +| * InactiveText | 0x002E | +| * OutOfService | 0x0051 | +| * Polarity | 0x0054 | +| * PresentValue | 0x0055 | +| * Reliability | 0x0067 | +| * StatusFlags | 0x006F | +| * ApplicationType | 0x0100 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | +| Cluster PulseWidthModulation | 0x001C | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -1191,34 +1199,16 @@ class OnOffOnWithTimedOff : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster LevelControl | 0x0008 | +| Cluster Descriptor | 0x001D | |------------------------------------------------------------------------------| | Commands: | | -| * MoveToLevel | 0x00 | -| * Move | 0x01 | -| * Step | 0x02 | -| * Stop | 0x03 | -| * MoveToLevelWithOnOff | 0x04 | -| * MoveWithOnOff | 0x05 | -| * StepWithOnOff | 0x06 | -| * StopWithOnOff | 0x07 | -| * MoveToClosestFrequency | 0x08 | |------------------------------------------------------------------------------| | Attributes: | | -| * CurrentLevel | 0x0000 | -| * RemainingTime | 0x0001 | -| * MinLevel | 0x0002 | -| * MaxLevel | 0x0003 | -| * CurrentFrequency | 0x0004 | -| * MinFrequency | 0x0005 | -| * MaxFrequency | 0x0006 | -| * Options | 0x000F | -| * OnOffTransitionTime | 0x0010 | -| * OnLevel | 0x0011 | -| * OnTransitionTime | 0x0012 | -| * OffTransitionTime | 0x0013 | -| * DefaultMoveRate | 0x0014 | -| * StartUpCurrentLevel | 0x4000 | +| * DeviceTypeList | 0x0000 | +| * ServerList | 0x0001 | +| * ClientList | 0x0002 | +| * PartsList | 0x0003 | +| * TagList | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -1229,35 +1219,106 @@ class OnOffOnWithTimedOff : public ClusterCommand | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command MoveToLevel - */ -class LevelControlMoveToLevel : public ClusterCommand -{ -public: - LevelControlMoveToLevel(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-level", credsIssuerConfig) - { - AddArgument("Level", 0, UINT8_MAX, &mRequest.level); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster Binding | 0x001E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Binding | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; +/*----------------------------------------------------------------------------*\ +| Cluster AccessControl | 0x001F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Acl | 0x0000 | +| * Extension | 0x0001 | +| * SubjectsPerAccessControlEntry | 0x0002 | +| * TargetsPerAccessControlEntry | 0x0003 | +| * AccessControlEntriesPerFabric | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AccessControlEntryChanged | 0x0000 | +| * AccessControlExtensionChanged | 0x0001 | +\*----------------------------------------------------------------------------*/ - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, +/*----------------------------------------------------------------------------*\ +| Cluster Actions | 0x0025 | +|------------------------------------------------------------------------------| +| Commands: | | +| * InstantAction | 0x00 | +| * InstantActionWithTransition | 0x01 | +| * StartAction | 0x02 | +| * StartActionWithDuration | 0x03 | +| * StopAction | 0x04 | +| * PauseAction | 0x05 | +| * PauseActionWithDuration | 0x06 | +| * ResumeAction | 0x07 | +| * EnableAction | 0x08 | +| * EnableActionWithDuration | 0x09 | +| * DisableAction | 0x0A | +| * DisableActionWithDuration | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActionList | 0x0000 | +| * EndpointLists | 0x0001 | +| * SetupURL | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChanged | 0x0000 | +| * ActionFailed | 0x0001 | +\*----------------------------------------------------------------------------*/ + +/* + * Command InstantAction + */ +class ActionsInstantAction : public ClusterCommand +{ +public: + ActionsInstantAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("instant-action", credsIssuerConfig) + { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); } CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1266,28 +1327,28 @@ class LevelControlMoveToLevel : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type mRequest; + chip::app::Clusters::Actions::Commands::InstantAction::Type mRequest; }; /* - * Command Move + * Command InstantActionWithTransition */ -class LevelControlMove : public ClusterCommand +class ActionsInstantActionWithTransition : public ClusterCommand { public: - LevelControlMove(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move", credsIssuerConfig) + ActionsInstantActionWithTransition(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("instant-action-with-transition", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1296,8 +1357,8 @@ class LevelControlMove : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Move::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1306,29 +1367,26 @@ class LevelControlMove : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::Move::Type mRequest; + chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type mRequest; }; /* - * Command Step + * Command StartAction */ -class LevelControlStep : public ClusterCommand +class ActionsStartAction : public ClusterCommand { public: - LevelControlStep(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step", credsIssuerConfig) + ActionsStartAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-action", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1337,8 +1395,8 @@ class LevelControlStep : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1347,26 +1405,28 @@ class LevelControlStep : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::Step::Type mRequest; + chip::app::Clusters::Actions::Commands::StartAction::Type mRequest; }; /* - * Command Stop + * Command StartActionWithDuration */ -class LevelControlStop : public ClusterCommand +class ActionsStartActionWithDuration : public ClusterCommand { public: - LevelControlStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + ActionsStartActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("start-action-with-duration", credsIssuerConfig) { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1375,8 +1435,8 @@ class LevelControlStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1385,29 +1445,26 @@ class LevelControlStop : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::Stop::Type mRequest; + chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type mRequest; }; /* - * Command MoveToLevelWithOnOff + * Command StopAction */ -class LevelControlMoveToLevelWithOnOff : public ClusterCommand +class ActionsStopAction : public ClusterCommand { public: - LevelControlMoveToLevelWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-level-with-on-off", credsIssuerConfig) + ActionsStopAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-action", credsIssuerConfig) { - AddArgument("Level", 0, UINT8_MAX, &mRequest.level); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1416,8 +1473,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1426,28 +1483,26 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type mRequest; + chip::app::Clusters::Actions::Commands::StopAction::Type mRequest; }; /* - * Command MoveWithOnOff + * Command PauseAction */ -class LevelControlMoveWithOnOff : public ClusterCommand +class ActionsPauseAction : public ClusterCommand { public: - LevelControlMoveWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-with-on-off", credsIssuerConfig) + ActionsPauseAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause-action", credsIssuerConfig) { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1456,8 +1511,8 @@ class LevelControlMoveWithOnOff : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1466,29 +1521,28 @@ class LevelControlMoveWithOnOff : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type mRequest; + chip::app::Clusters::Actions::Commands::PauseAction::Type mRequest; }; /* - * Command StepWithOnOff + * Command PauseActionWithDuration */ -class LevelControlStepWithOnOff : public ClusterCommand +class ActionsPauseActionWithDuration : public ClusterCommand { public: - LevelControlStepWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("step-with-on-off", credsIssuerConfig) + ActionsPauseActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("pause-action-with-duration", credsIssuerConfig) { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1497,8 +1551,8 @@ class LevelControlStepWithOnOff : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1507,26 +1561,26 @@ class LevelControlStepWithOnOff : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type mRequest; + chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type mRequest; }; /* - * Command StopWithOnOff + * Command ResumeAction */ -class LevelControlStopWithOnOff : public ClusterCommand +class ActionsResumeAction : public ClusterCommand { public: - LevelControlStopWithOnOff(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-with-on-off", credsIssuerConfig) + ActionsResumeAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume-action", credsIssuerConfig) { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1535,8 +1589,8 @@ class LevelControlStopWithOnOff : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1545,26 +1599,26 @@ class LevelControlStopWithOnOff : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type mRequest; + chip::app::Clusters::Actions::Commands::ResumeAction::Type mRequest; }; /* - * Command MoveToClosestFrequency + * Command EnableAction */ -class LevelControlMoveToClosestFrequency : public ClusterCommand +class ActionsEnableAction : public ClusterCommand { public: - LevelControlMoveToClosestFrequency(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("move-to-closest-frequency", credsIssuerConfig) + ActionsEnableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-action", credsIssuerConfig) { - AddArgument("Frequency", 0, UINT16_MAX, &mRequest.frequency); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1573,8 +1627,8 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1583,161 +1637,28 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand } private: - chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type mRequest; + chip::app::Clusters::Actions::Commands::EnableAction::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BinaryInputBasic | 0x000F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActiveText | 0x0004 | -| * Description | 0x001C | -| * InactiveText | 0x002E | -| * OutOfService | 0x0051 | -| * Polarity | 0x0054 | -| * PresentValue | 0x0055 | -| * Reliability | 0x0067 | -| * StatusFlags | 0x006F | -| * ApplicationType | 0x0100 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster PulseWidthModulation | 0x001C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Descriptor | 0x001D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * DeviceTypeList | 0x0000 | -| * ServerList | 0x0001 | -| * ClientList | 0x0002 | -| * PartsList | 0x0003 | -| * TagList | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Binding | 0x001E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Binding | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster AccessControl | 0x001F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Acl | 0x0000 | -| * Extension | 0x0001 | -| * SubjectsPerAccessControlEntry | 0x0002 | -| * TargetsPerAccessControlEntry | 0x0003 | -| * AccessControlEntriesPerFabric | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * AccessControlEntryChanged | 0x0000 | -| * AccessControlExtensionChanged | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Actions | 0x0025 | -|------------------------------------------------------------------------------| -| Commands: | | -| * InstantAction | 0x00 | -| * InstantActionWithTransition | 0x01 | -| * StartAction | 0x02 | -| * StartActionWithDuration | 0x03 | -| * StopAction | 0x04 | -| * PauseAction | 0x05 | -| * PauseActionWithDuration | 0x06 | -| * ResumeAction | 0x07 | -| * EnableAction | 0x08 | -| * EnableActionWithDuration | 0x09 | -| * DisableAction | 0x0A | -| * DisableActionWithDuration | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActionList | 0x0000 | -| * EndpointLists | 0x0001 | -| * SetupURL | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChanged | 0x0000 | -| * ActionFailed | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command InstantAction + * Command EnableActionWithDuration */ -class ActionsInstantAction : public ClusterCommand +class ActionsEnableActionWithDuration : public ClusterCommand { public: - ActionsInstantAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("instant-action", credsIssuerConfig) + ActionsEnableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enable-action-with-duration", credsIssuerConfig) { AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1747,7 +1668,7 @@ class ActionsInstantAction : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1756,28 +1677,26 @@ class ActionsInstantAction : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::InstantAction::Type mRequest; + chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type mRequest; }; /* - * Command InstantActionWithTransition + * Command DisableAction */ -class ActionsInstantActionWithTransition : public ClusterCommand +class ActionsDisableAction : public ClusterCommand { public: - ActionsInstantActionWithTransition(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("instant-action-with-transition", credsIssuerConfig) + ActionsDisableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable-action", credsIssuerConfig) { AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1787,7 +1706,7 @@ class ActionsInstantActionWithTransition : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1796,26 +1715,28 @@ class ActionsInstantActionWithTransition : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type mRequest; + chip::app::Clusters::Actions::Commands::DisableAction::Type mRequest; }; /* - * Command StartAction + * Command DisableActionWithDuration */ -class ActionsStartAction : public ClusterCommand +class ActionsDisableActionWithDuration : public ClusterCommand { public: - ActionsStartAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start-action", credsIssuerConfig) + ActionsDisableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("disable-action-with-duration", credsIssuerConfig) { AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1825,7 +1746,7 @@ class ActionsStartAction : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1834,28 +1755,69 @@ class ActionsStartAction : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::StartAction::Type mRequest; + chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster BasicInformation | 0x0028 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MfgSpecificPing | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DataModelRevision | 0x0000 | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * ProductID | 0x0004 | +| * NodeLabel | 0x0005 | +| * Location | 0x0006 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * LocalConfigDisabled | 0x0010 | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * CapabilityMinima | 0x0013 | +| * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ + /* - * Command StartActionWithDuration + * Command MfgSpecificPing */ -class ActionsStartActionWithDuration : public ClusterCommand +class BasicInformationMfgSpecificPing : public ClusterCommand { public: - ActionsStartActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("start-action-with-duration", credsIssuerConfig) + BasicInformationMfgSpecificPing(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("mfg-specific-ping", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1864,8 +1826,8 @@ class ActionsStartActionWithDuration : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1874,64 +1836,52 @@ class ActionsStartActionWithDuration : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type mRequest; + chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OtaSoftwareUpdateProvider | 0x0029 | +|------------------------------------------------------------------------------| +| Commands: | | +| * QueryImage | 0x00 | +| * ApplyUpdateRequest | 0x02 | +| * NotifyUpdateApplied | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command StopAction + * Command QueryImage */ -class ActionsStopAction : public ClusterCommand +class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { public: - ActionsStopAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop-action", credsIssuerConfig) - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + OtaSoftwareUpdateProviderQueryImage(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("query-image", credsIssuerConfig), mComplex_ProtocolsSupported(&mRequest.protocolsSupported) { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Actions::Commands::StopAction::Type mRequest; -}; - -/* - * Command PauseAction - */ -class ActionsPauseAction : public ClusterCommand -{ -public: - ActionsPauseAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause-action", credsIssuerConfig) - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); + AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); + AddArgument("Location", &mRequest.location); + AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); + AddArgument("MetadataForProvider", &mRequest.metadataForProvider); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1940,8 +1890,8 @@ class ActionsPauseAction : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1950,28 +1900,29 @@ class ActionsPauseAction : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::PauseAction::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; + TypedComplexArgument> + mComplex_ProtocolsSupported; }; /* - * Command PauseActionWithDuration + * Command ApplyUpdateRequest */ -class ActionsPauseActionWithDuration : public ClusterCommand +class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { public: - ActionsPauseActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("pause-action-with-duration", credsIssuerConfig) + OtaSoftwareUpdateProviderApplyUpdateRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("apply-update-request", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -1980,8 +1931,8 @@ class ActionsPauseActionWithDuration : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -1990,26 +1941,27 @@ class ActionsPauseActionWithDuration : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; }; /* - * Command ResumeAction + * Command NotifyUpdateApplied */ -class ActionsResumeAction : public ClusterCommand +class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { public: - ActionsResumeAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume-action", credsIssuerConfig) + OtaSoftwareUpdateProviderNotifyUpdateApplied(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("notify-update-applied", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2018,8 +1970,8 @@ class ActionsResumeAction : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2028,66 +1980,54 @@ class ActionsResumeAction : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::ResumeAction::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; }; -/* - * Command EnableAction - */ -class ActionsEnableAction : public ClusterCommand -{ -public: - ActionsEnableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enable-action", credsIssuerConfig) - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Actions::Commands::EnableAction::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster OtaSoftwareUpdateRequestor | 0x002A | +|------------------------------------------------------------------------------| +| Commands: | | +| * AnnounceOTAProvider | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DefaultOTAProviders | 0x0000 | +| * UpdatePossible | 0x0001 | +| * UpdateState | 0x0002 | +| * UpdateStateProgress | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateTransition | 0x0000 | +| * VersionApplied | 0x0001 | +| * DownloadError | 0x0002 | +\*----------------------------------------------------------------------------*/ /* - * Command EnableActionWithDuration + * Command AnnounceOTAProvider */ -class ActionsEnableActionWithDuration : public ClusterCommand +class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { public: - ActionsEnableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("enable-action-with-duration", credsIssuerConfig) + OtaSoftwareUpdateRequestorAnnounceOTAProvider(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("announce-otaprovider", credsIssuerConfig) { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); + AddArgument("MetadataForNode", &mRequest.metadataForNode); + AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2096,8 +2036,8 @@ class ActionsEnableActionWithDuration : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2106,117 +2046,70 @@ class ActionsEnableActionWithDuration : public ClusterCommand } private: - chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type mRequest; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; }; -/* - * Command DisableAction - */ -class ActionsDisableAction : public ClusterCommand -{ -public: - ActionsDisableAction(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("disable-action", credsIssuerConfig) - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster LocalizationConfiguration | 0x002B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveLocale | 0x0000 | +| * SupportedLocales | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; +/*----------------------------------------------------------------------------*\ +| Cluster TimeFormatLocalization | 0x002C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * HourFormat | 0x0000 | +| * ActiveCalendarType | 0x0001 | +| * SupportedCalendarTypes | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Actions::Commands::DisableAction::Type mRequest; -}; - -/* - * Command DisableActionWithDuration - */ -class ActionsDisableActionWithDuration : public ClusterCommand -{ -public: - ActionsDisableActionWithDuration(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("disable-action-with-duration", credsIssuerConfig) - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster UnitLocalization | 0x002D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureUnit | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster BasicInformation | 0x0028 | +| Cluster PowerSourceConfiguration | 0x002E | |------------------------------------------------------------------------------| | Commands: | | -| * MfgSpecificPing | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * DataModelRevision | 0x0000 | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * ProductID | 0x0004 | -| * NodeLabel | 0x0005 | -| * Location | 0x0006 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * LocalConfigDisabled | 0x0010 | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * CapabilityMinima | 0x0013 | -| * ProductAppearance | 0x0014 | -| * SpecificationVersion | 0x0015 | -| * MaxPathsPerInvoke | 0x0016 | +| * Sources | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -2225,58 +2118,73 @@ class ActionsDisableActionWithDuration : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | \*----------------------------------------------------------------------------*/ -/* - * Command MfgSpecificPing - */ -class BasicInformationMfgSpecificPing : public ClusterCommand -{ -public: - BasicInformationMfgSpecificPing(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("mfg-specific-ping", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::BasicInformation::Commands::MfgSpecificPing::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster PowerSource | 0x002F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Status | 0x0000 | +| * Order | 0x0001 | +| * Description | 0x0002 | +| * WiredAssessedInputVoltage | 0x0003 | +| * WiredAssessedInputFrequency | 0x0004 | +| * WiredCurrentType | 0x0005 | +| * WiredAssessedCurrent | 0x0006 | +| * WiredNominalVoltage | 0x0007 | +| * WiredMaximumCurrent | 0x0008 | +| * WiredPresent | 0x0009 | +| * ActiveWiredFaults | 0x000A | +| * BatVoltage | 0x000B | +| * BatPercentRemaining | 0x000C | +| * BatTimeRemaining | 0x000D | +| * BatChargeLevel | 0x000E | +| * BatReplacementNeeded | 0x000F | +| * BatReplaceability | 0x0010 | +| * BatPresent | 0x0011 | +| * ActiveBatFaults | 0x0012 | +| * BatReplacementDescription | 0x0013 | +| * BatCommonDesignation | 0x0014 | +| * BatANSIDesignation | 0x0015 | +| * BatIECDesignation | 0x0016 | +| * BatApprovedChemistry | 0x0017 | +| * BatCapacity | 0x0018 | +| * BatQuantity | 0x0019 | +| * BatChargeState | 0x001A | +| * BatTimeToFullCharge | 0x001B | +| * BatFunctionalWhileCharging | 0x001C | +| * BatChargingCurrent | 0x001D | +| * ActiveBatChargeFaults | 0x001E | +| * EndpointList | 0x001F | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * WiredFaultChange | 0x0000 | +| * BatFaultChange | 0x0001 | +| * BatChargeFaultChange | 0x0002 | +\*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateProvider | 0x0029 | +| Cluster GeneralCommissioning | 0x0030 | |------------------------------------------------------------------------------| | Commands: | | -| * QueryImage | 0x00 | -| * ApplyUpdateRequest | 0x02 | -| * NotifyUpdateApplied | 0x04 | +| * ArmFailSafe | 0x00 | +| * SetRegulatoryConfig | 0x02 | +| * CommissioningComplete | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | +| * Breadcrumb | 0x0000 | +| * BasicCommissioningInfo | 0x0001 | +| * RegulatoryConfig | 0x0002 | +| * LocationCapability | 0x0003 | +| * SupportsConcurrentConnection | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -2288,29 +2196,23 @@ class BasicInformationMfgSpecificPing : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command QueryImage + * Command ArmFailSafe */ -class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand +class GeneralCommissioningArmFailSafe : public ClusterCommand { public: - OtaSoftwareUpdateProviderQueryImage(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("query-image", credsIssuerConfig), mComplex_ProtocolsSupported(&mRequest.protocolsSupported) + GeneralCommissioningArmFailSafe(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("arm-fail-safe", credsIssuerConfig) { - AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); - AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); - AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); - AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); - AddArgument("Location", &mRequest.location); - AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); - AddArgument("MetadataForProvider", &mRequest.metadataForProvider); + AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2319,8 +2221,8 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2329,29 +2231,28 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; - TypedComplexArgument> - mComplex_ProtocolsSupported; + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; }; /* - * Command ApplyUpdateRequest + * Command SetRegulatoryConfig */ -class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand +class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { public: - OtaSoftwareUpdateProviderApplyUpdateRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("apply-update-request", credsIssuerConfig) + GeneralCommissioningSetRegulatoryConfig(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-regulatory-config", credsIssuerConfig) { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); + AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); + AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2360,8 +2261,8 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2370,27 +2271,25 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; }; /* - * Command NotifyUpdateApplied + * Command CommissioningComplete */ -class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand +class GeneralCommissioningCommissioningComplete : public ClusterCommand { public: - OtaSoftwareUpdateProviderNotifyUpdateApplied(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("notify-update-applied", credsIssuerConfig) + GeneralCommissioningCommissioningComplete(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("commissioning-complete", credsIssuerConfig) { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2399,8 +2298,8 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2409,20 +2308,33 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; + chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateRequestor | 0x002A | +| Cluster NetworkCommissioning | 0x0031 | |------------------------------------------------------------------------------| | Commands: | | -| * AnnounceOTAProvider | 0x00 | +| * ScanNetworks | 0x00 | +| * AddOrUpdateWiFiNetwork | 0x02 | +| * AddOrUpdateThreadNetwork | 0x03 | +| * RemoveNetwork | 0x04 | +| * ConnectNetwork | 0x06 | +| * ReorderNetwork | 0x08 | +| * QueryIdentity | 0x09 | |------------------------------------------------------------------------------| | Attributes: | | -| * DefaultOTAProviders | 0x0000 | -| * UpdatePossible | 0x0001 | -| * UpdateState | 0x0002 | -| * UpdateStateProgress | 0x0003 | +| * MaxNetworks | 0x0000 | +| * Networks | 0x0001 | +| * ScanMaxTimeSeconds | 0x0002 | +| * ConnectMaxTimeSeconds | 0x0003 | +| * InterfaceEnabled | 0x0004 | +| * LastNetworkingStatus | 0x0005 | +| * LastNetworkID | 0x0006 | +| * LastConnectErrorValue | 0x0007 | +| * SupportedWiFiBands | 0x0008 | +| * SupportedThreadFeatures | 0x0009 | +| * ThreadVersion | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -2431,32 +2343,26 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StateTransition | 0x0000 | -| * VersionApplied | 0x0001 | -| * DownloadError | 0x0002 | \*----------------------------------------------------------------------------*/ /* - * Command AnnounceOTAProvider + * Command ScanNetworks */ -class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand +class NetworkCommissioningScanNetworks : public ClusterCommand { public: - OtaSoftwareUpdateRequestorAnnounceOTAProvider(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("announce-otaprovider", credsIssuerConfig) + NetworkCommissioningScanNetworks(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("scan-networks", credsIssuerConfig) { - AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); - AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); - AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); - AddArgument("MetadataForNode", &mRequest.metadataForNode); - AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2465,8 +2371,8 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2475,173 +2381,31 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand } private: - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster LocalizationConfiguration | 0x002B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActiveLocale | 0x0000 | -| * SupportedLocales | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster TimeFormatLocalization | 0x002C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * HourFormat | 0x0000 | -| * ActiveCalendarType | 0x0001 | -| * SupportedCalendarTypes | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster UnitLocalization | 0x002D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureUnit | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster PowerSourceConfiguration | 0x002E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Sources | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster PowerSource | 0x002F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Status | 0x0000 | -| * Order | 0x0001 | -| * Description | 0x0002 | -| * WiredAssessedInputVoltage | 0x0003 | -| * WiredAssessedInputFrequency | 0x0004 | -| * WiredCurrentType | 0x0005 | -| * WiredAssessedCurrent | 0x0006 | -| * WiredNominalVoltage | 0x0007 | -| * WiredMaximumCurrent | 0x0008 | -| * WiredPresent | 0x0009 | -| * ActiveWiredFaults | 0x000A | -| * BatVoltage | 0x000B | -| * BatPercentRemaining | 0x000C | -| * BatTimeRemaining | 0x000D | -| * BatChargeLevel | 0x000E | -| * BatReplacementNeeded | 0x000F | -| * BatReplaceability | 0x0010 | -| * BatPresent | 0x0011 | -| * ActiveBatFaults | 0x0012 | -| * BatReplacementDescription | 0x0013 | -| * BatCommonDesignation | 0x0014 | -| * BatANSIDesignation | 0x0015 | -| * BatIECDesignation | 0x0016 | -| * BatApprovedChemistry | 0x0017 | -| * BatCapacity | 0x0018 | -| * BatQuantity | 0x0019 | -| * BatChargeState | 0x001A | -| * BatTimeToFullCharge | 0x001B | -| * BatFunctionalWhileCharging | 0x001C | -| * BatChargingCurrent | 0x001D | -| * ActiveBatChargeFaults | 0x001E | -| * EndpointList | 0x001F | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * WiredFaultChange | 0x0000 | -| * BatFaultChange | 0x0001 | -| * BatChargeFaultChange | 0x0002 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster GeneralCommissioning | 0x0030 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ArmFailSafe | 0x00 | -| * SetRegulatoryConfig | 0x02 | -| * CommissioningComplete | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Breadcrumb | 0x0000 | -| * BasicCommissioningInfo | 0x0001 | -| * RegulatoryConfig | 0x0002 | -| * LocationCapability | 0x0003 | -| * SupportsConcurrentConnection | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ArmFailSafe + * Command AddOrUpdateWiFiNetwork */ -class GeneralCommissioningArmFailSafe : public ClusterCommand +class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { public: - GeneralCommissioningArmFailSafe(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("arm-fail-safe", credsIssuerConfig) + NetworkCommissioningAddOrUpdateWiFiNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-or-update-wi-fi-network", credsIssuerConfig) { - AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Credentials", &mRequest.credentials); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("NetworkIdentity", &mRequest.networkIdentity); + AddArgument("ClientIdentifier", &mRequest.clientIdentifier); + AddArgument("PossessionNonce", &mRequest.possessionNonce); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2650,8 +2414,8 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2660,28 +2424,27 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand } private: - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; /* - * Command SetRegulatoryConfig + * Command AddOrUpdateThreadNetwork */ -class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand +class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { public: - GeneralCommissioningSetRegulatoryConfig(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-regulatory-config", credsIssuerConfig) + NetworkCommissioningAddOrUpdateThreadNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-or-update-thread-network", credsIssuerConfig) { - AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); - AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("OperationalDataset", &mRequest.operationalDataset); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -2690,8 +2453,8 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -2700,212 +2463,20 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand } private: - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; }; /* - * Command CommissioningComplete + * Command RemoveNetwork */ -class GeneralCommissioningCommissioningComplete : public ClusterCommand +class NetworkCommissioningRemoveNetwork : public ClusterCommand { public: - GeneralCommissioningCommissioningComplete(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("commissioning-complete", credsIssuerConfig) + NetworkCommissioningRemoveNetwork(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-network", credsIssuerConfig) { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster NetworkCommissioning | 0x0031 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ScanNetworks | 0x00 | -| * AddOrUpdateWiFiNetwork | 0x02 | -| * AddOrUpdateThreadNetwork | 0x03 | -| * RemoveNetwork | 0x04 | -| * ConnectNetwork | 0x06 | -| * ReorderNetwork | 0x08 | -| * QueryIdentity | 0x09 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxNetworks | 0x0000 | -| * Networks | 0x0001 | -| * ScanMaxTimeSeconds | 0x0002 | -| * ConnectMaxTimeSeconds | 0x0003 | -| * InterfaceEnabled | 0x0004 | -| * LastNetworkingStatus | 0x0005 | -| * LastNetworkID | 0x0006 | -| * LastConnectErrorValue | 0x0007 | -| * SupportedWiFiBands | 0x0008 | -| * SupportedThreadFeatures | 0x0009 | -| * ThreadVersion | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ScanNetworks - */ -class NetworkCommissioningScanNetworks : public ClusterCommand -{ -public: - NetworkCommissioningScanNetworks(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("scan-networks", credsIssuerConfig) - { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; -}; - -/* - * Command AddOrUpdateWiFiNetwork - */ -class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand -{ -public: - NetworkCommissioningAddOrUpdateWiFiNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-or-update-wi-fi-network", credsIssuerConfig) - { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Credentials", &mRequest.credentials); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - AddArgument("NetworkIdentity", &mRequest.networkIdentity); - AddArgument("ClientIdentifier", &mRequest.clientIdentifier); - AddArgument("PossessionNonce", &mRequest.possessionNonce); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; -}; - -/* - * Command AddOrUpdateThreadNetwork - */ -class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand -{ -public: - NetworkCommissioningAddOrUpdateThreadNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-or-update-thread-network", credsIssuerConfig) - { - AddArgument("OperationalDataset", &mRequest.operationalDataset); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; -}; - -/* - * Command RemoveNetwork - */ -class NetworkCommissioningRemoveNetwork : public ClusterCommand -{ -public: - NetworkCommissioningRemoveNetwork(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("remove-network", credsIssuerConfig) - { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } @@ -3514,8 +3085,450 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster TimeSynchronization | 0x0038 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetUTCTime | 0x00 | +| * SetTrustedTimeSource | 0x01 | +| * SetTimeZone | 0x02 | +| * SetDSTOffset | 0x04 | +| * SetDefaultNTP | 0x05 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * UTCTime | 0x0000 | +| * Granularity | 0x0001 | +| * TimeSource | 0x0002 | +| * TrustedTimeSource | 0x0003 | +| * DefaultNTP | 0x0004 | +| * TimeZone | 0x0005 | +| * DSTOffset | 0x0006 | +| * LocalTime | 0x0007 | +| * TimeZoneDatabase | 0x0008 | +| * NTPServerAvailable | 0x0009 | +| * TimeZoneListMaxSize | 0x000A | +| * DSTOffsetListMaxSize | 0x000B | +| * SupportsDNSResolve | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * DSTTableEmpty | 0x0000 | +| * DSTStatus | 0x0001 | +| * TimeZoneStatus | 0x0002 | +| * TimeFailure | 0x0003 | +| * MissingTrustedTimeSource | 0x0004 | +\*----------------------------------------------------------------------------*/ + +/* + * Command SetUTCTime + */ +class TimeSynchronizationSetUTCTime : public ClusterCommand +{ +public: + TimeSynchronizationSetUTCTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-utctime", credsIssuerConfig) + { + AddArgument("UTCTime", 0, UINT64_MAX, &mRequest.UTCTime); + AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); + AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type mRequest; +}; + +/* + * Command SetTrustedTimeSource + */ +class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand +{ +public: + TimeSynchronizationSetTrustedTimeSource(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-trusted-time-source", credsIssuerConfig), mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) + { + AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; + TypedComplexArgument> + mComplex_TrustedTimeSource; +}; + +/* + * Command SetTimeZone + */ +class TimeSynchronizationSetTimeZone : public ClusterCommand +{ +public: + TimeSynchronizationSetTimeZone(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-time-zone", credsIssuerConfig), mComplex_TimeZone(&mRequest.timeZone) + { + AddArgument("TimeZone", &mComplex_TimeZone); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; + TypedComplexArgument> + mComplex_TimeZone; +}; + +/* + * Command SetDSTOffset + */ +class TimeSynchronizationSetDSTOffset : public ClusterCommand +{ +public: + TimeSynchronizationSetDSTOffset(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-dstoffset", credsIssuerConfig), mComplex_DSTOffset(&mRequest.DSTOffset) + { + AddArgument("DSTOffset", &mComplex_DSTOffset); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; + TypedComplexArgument> + mComplex_DSTOffset; +}; + +/* + * Command SetDefaultNTP + */ +class TimeSynchronizationSetDefaultNTP : public ClusterCommand +{ +public: + TimeSynchronizationSetDefaultNTP(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-default-ntp", credsIssuerConfig) + { + AddArgument("DefaultNTP", &mRequest.defaultNTP); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasicInformation | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * NodeLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * ProductAppearance | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster Switch | 0x003B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NumberOfPositions | 0x0000 | +| * CurrentPosition | 0x0001 | +| * MultiPressMax | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SwitchLatched | 0x0000 | +| * InitialPress | 0x0001 | +| * LongPress | 0x0002 | +| * ShortRelease | 0x0003 | +| * LongRelease | 0x0004 | +| * MultiPressOngoing | 0x0005 | +| * MultiPressComplete | 0x0006 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster AdministratorCommissioning | 0x003C | +|------------------------------------------------------------------------------| +| Commands: | | +| * OpenCommissioningWindow | 0x00 | +| * OpenBasicCommissioningWindow | 0x01 | +| * RevokeCommissioning | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowStatus | 0x0000 | +| * AdminFabricIndex | 0x0001 | +| * AdminVendorId | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command OpenCommissioningWindow + */ +class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand +{ +public: + AdministratorCommissioningOpenCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("open-commissioning-window", credsIssuerConfig) + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); + AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); + AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); + AddArgument("Salt", &mRequest.salt); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; +}; + +/* + * Command OpenBasicCommissioningWindow + */ +class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand +{ +public: + AdministratorCommissioningOpenBasicCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("open-basic-commissioning-window", credsIssuerConfig) + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; +}; + +/* + * Command RevokeCommissioning + */ +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand +{ +public: + AdministratorCommissioningRevokeCommissioning(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("revoke-commissioning", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3524,33 +3537,29 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand } private: - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster TimeSynchronization | 0x0038 | +| Cluster OperationalCredentials | 0x003E | |------------------------------------------------------------------------------| | Commands: | | -| * SetUTCTime | 0x00 | -| * SetTrustedTimeSource | 0x01 | -| * SetTimeZone | 0x02 | -| * SetDSTOffset | 0x04 | -| * SetDefaultNTP | 0x05 | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * UTCTime | 0x0000 | -| * Granularity | 0x0001 | -| * TimeSource | 0x0002 | -| * TrustedTimeSource | 0x0003 | -| * DefaultNTP | 0x0004 | -| * TimeZone | 0x0005 | -| * DSTOffset | 0x0006 | -| * LocalTime | 0x0007 | -| * TimeZoneDatabase | 0x0008 | -| * NTPServerAvailable | 0x0009 | -| * TimeZoneListMaxSize | 0x000A | -| * DSTOffsetListMaxSize | 0x000B | -| * SupportsDNSResolve | 0x000C | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3559,31 +3568,25 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * DSTTableEmpty | 0x0000 | -| * DSTStatus | 0x0001 | -| * TimeZoneStatus | 0x0002 | -| * TimeFailure | 0x0003 | -| * MissingTrustedTimeSource | 0x0004 | \*----------------------------------------------------------------------------*/ /* - * Command SetUTCTime + * Command AttestationRequest */ -class TimeSynchronizationSetUTCTime : public ClusterCommand +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - TimeSynchronizationSetUTCTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-utctime", credsIssuerConfig) + OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("attestation-request", credsIssuerConfig) { - AddArgument("UTCTime", 0, UINT64_MAX, &mRequest.UTCTime); - AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); - AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); + AddArgument("AttestationNonce", &mRequest.attestationNonce); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3592,8 +3595,8 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3602,26 +3605,26 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; /* - * Command SetTrustedTimeSource + * Command CertificateChainRequest */ -class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { public: - TimeSynchronizationSetTrustedTimeSource(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-trusted-time-source", credsIssuerConfig), mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) + OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("certificate-chain-request", credsIssuerConfig) { - AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); + AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3630,8 +3633,8 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3640,29 +3643,26 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; - TypedComplexArgument> - mComplex_TrustedTimeSource; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; /* - * Command SetTimeZone + * Command CSRRequest */ -class TimeSynchronizationSetTimeZone : public ClusterCommand +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - TimeSynchronizationSetTimeZone(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-time-zone", credsIssuerConfig), mComplex_TimeZone(&mRequest.timeZone) + OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) { - AddArgument("TimeZone", &mComplex_TimeZone); + AddArgument("CSRNonce", &mRequest.CSRNonce); + AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3671,8 +3671,8 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3681,28 +3681,29 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; - TypedComplexArgument> - mComplex_TimeZone; + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; /* - * Command SetDSTOffset + * Command AddNOC */ -class TimeSynchronizationSetDSTOffset : public ClusterCommand +class OperationalCredentialsAddNOC : public ClusterCommand { public: - TimeSynchronizationSetDSTOffset(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-dstoffset", credsIssuerConfig), mComplex_DSTOffset(&mRequest.DSTOffset) + OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) { - AddArgument("DSTOffset", &mComplex_DSTOffset); + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + AddArgument("IPKValue", &mRequest.IPKValue); + AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); + AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3711,8 +3712,8 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3721,28 +3722,26 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; - TypedComplexArgument> - mComplex_DSTOffset; + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; /* - * Command SetDefaultNTP + * Command UpdateNOC */ -class TimeSynchronizationSetDefaultNTP : public ClusterCommand +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - TimeSynchronizationSetDefaultNTP(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-default-ntp", credsIssuerConfig) + OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) { - AddArgument("DefaultNTP", &mRequest.defaultNTP); + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3751,8 +3750,8 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3761,115 +3760,26 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BridgedDeviceBasicInformation | 0x0039 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * NodeLabel | 0x0005 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * ProductAppearance | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster Switch | 0x003B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NumberOfPositions | 0x0000 | -| * CurrentPosition | 0x0001 | -| * MultiPressMax | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SwitchLatched | 0x0000 | -| * InitialPress | 0x0001 | -| * LongPress | 0x0002 | -| * ShortRelease | 0x0003 | -| * LongRelease | 0x0004 | -| * MultiPressOngoing | 0x0005 | -| * MultiPressComplete | 0x0006 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster AdministratorCommissioning | 0x003C | -|------------------------------------------------------------------------------| -| Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command OpenCommissioningWindow + * Command UpdateFabricLabel */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { public: - AdministratorCommissioningOpenCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-commissioning-window", credsIssuerConfig) + OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("update-fabric-label", credsIssuerConfig) { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); - AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); - AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); - AddArgument("Salt", &mRequest.salt); + AddArgument("Label", &mRequest.label); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3878,9 +3788,8 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3889,27 +3798,26 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; /* - * Command OpenBasicCommissioningWindow + * Command RemoveFabric */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - AdministratorCommissioningOpenBasicCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-basic-commissioning-window", credsIssuerConfig) + OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-fabric", credsIssuerConfig) { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3918,9 +3826,8 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3929,25 +3836,26 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; /* - * Command RevokeCommissioning + * Command AddTrustedRootCertificate */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { public: - AdministratorCommissioningRevokeCommissioning(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("revoke-commissioning", credsIssuerConfig) + OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) { + AddArgument("RootCACertificate", &mRequest.rootCACertificate); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3956,8 +3864,8 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3966,29 +3874,23 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand } private: - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster GroupKeyManagement | 0x003F | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4000,22 +3902,22 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command AttestationRequest + * Command KeySetWrite */ -class OperationalCredentialsAttestationRequest : public ClusterCommand +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("attestation-request", credsIssuerConfig) + GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) { - AddArgument("AttestationNonce", &mRequest.attestationNonce); + AddArgument("GroupKeySet", &mComplex_GroupKeySet); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4024,8 +3926,8 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4034,26 +3936,26 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; /* - * Command CertificateChainRequest + * Command KeySetRead */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("certificate-chain-request", credsIssuerConfig) + GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4062,8 +3964,8 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4072,26 +3974,26 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command CSRRequest + * Command KeySetRemove */ -class OperationalCredentialsCSRRequest : public ClusterCommand +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) + GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-remove", credsIssuerConfig) { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4100,8 +4002,8 @@ class OperationalCredentialsCSRRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4110,29 +4012,25 @@ class OperationalCredentialsCSRRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; }; /* - * Command AddNOC + * Command KeySetReadAllIndices */ -class OperationalCredentialsAddNOC : public ClusterCommand +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) + GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-read-all-indices", credsIssuerConfig) { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - AddArgument("IPKValue", &mRequest.IPKValue); - AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); - AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4141,8 +4039,8 @@ class OperationalCredentialsAddNOC : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4151,64 +4049,157 @@ class OperationalCredentialsAddNOC : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; }; -/* - * Command UpdateNOC - */ -class OperationalCredentialsUpdateNOC : public ClusterCommand -{ -public: - OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) - { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - ClusterCommand::AddArguments(); - } +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; +/*----------------------------------------------------------------------------*\ +| Cluster UserLabel | 0x0041 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster ProxyConfiguration | 0x0042 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; +/*----------------------------------------------------------------------------*\ +| Cluster ProxyDiscovery | 0x0043 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); +/*----------------------------------------------------------------------------*\ +| Cluster ProxyValid | 0x0044 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; -}; +/*----------------------------------------------------------------------------*\ +| Cluster IcdManagement | 0x0046 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterClient | 0x00 | +| * UnregisterClient | 0x02 | +| * StayActiveRequest | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * IdleModeDuration | 0x0000 | +| * ActiveModeDuration | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * RegisteredClients | 0x0003 | +| * ICDCounter | 0x0004 | +| * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | +| * OperatingMode | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OnTransitionToActiveMode | 0x0000 | +\*----------------------------------------------------------------------------*/ /* - * Command UpdateFabricLabel + * Command RegisterClient */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand +class IcdManagementRegisterClient : public ClusterCommand { public: - OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("update-fabric-label", credsIssuerConfig) + IcdManagementRegisterClient(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("register-client", credsIssuerConfig) { - AddArgument("Label", &mRequest.label); + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); + AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); + AddArgument("Key", &mRequest.key); + AddArgument("VerificationKey", &mRequest.verificationKey); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4217,8 +4208,8 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4227,26 +4218,27 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; /* - * Command RemoveFabric + * Command UnregisterClient */ -class OperationalCredentialsRemoveFabric : public ClusterCommand +class IcdManagementUnregisterClient : public ClusterCommand { public: - OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("remove-fabric", credsIssuerConfig) + IcdManagementUnregisterClient(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unregister-client", credsIssuerConfig) { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); + AddArgument("VerificationKey", &mRequest.verificationKey); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4255,8 +4247,8 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4265,26 +4257,25 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; }; /* - * Command AddTrustedRootCertificate + * Command StayActiveRequest */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand +class IcdManagementStayActiveRequest : public ClusterCommand { public: - OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) + IcdManagementStayActiveRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stay-active-request", credsIssuerConfig) { - AddArgument("RootCACertificate", &mRequest.rootCACertificate); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4293,8 +4284,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4303,23 +4294,22 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | +| Cluster Timer | 0x0047 | |------------------------------------------------------------------------------| | Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4331,22 +4321,21 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command KeySetWrite + * Command SetTimer */ -class GroupKeyManagementKeySetWrite : public ClusterCommand +class TimerSetTimer : public ClusterCommand { public: - GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) + TimerSetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-timer", credsIssuerConfig) { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4355,8 +4344,8 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4365,26 +4354,24 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; + chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; }; /* - * Command KeySetRead + * Command ResetTimer */ -class GroupKeyManagementKeySetRead : public ClusterCommand +class TimerResetTimer : public ClusterCommand { public: - GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) + TimerResetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-timer", credsIssuerConfig) { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4393,8 +4380,8 @@ class GroupKeyManagementKeySetRead : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4403,26 +4390,25 @@ class GroupKeyManagementKeySetRead : public ClusterCommand } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; + chip::app::Clusters::Timer::Commands::ResetTimer::Type mRequest; }; /* - * Command KeySetRemove + * Command AddTime */ -class GroupKeyManagementKeySetRemove : public ClusterCommand +class TimerAddTime : public ClusterCommand { public: - GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-remove", credsIssuerConfig) + TimerAddTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-time", credsIssuerConfig) { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4431,8 +4417,8 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4441,164 +4427,62 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; + chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; }; /* - * Command KeySetReadAllIndices + * Command ReduceTime */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand +class TimerReduceTime : public ClusterCommand { public: - GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-read-all-indices", credsIssuerConfig) + TimerReduceTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reduce-time", credsIssuerConfig) { + AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; -/*----------------------------------------------------------------------------*\ -| Cluster ProxyConfiguration | 0x0042 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } -/*----------------------------------------------------------------------------*\ -| Cluster ProxyDiscovery | 0x0043 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; -/*----------------------------------------------------------------------------*\ -| Cluster ProxyValid | 0x0044 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); -/*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; +}; /*----------------------------------------------------------------------------*\ -| Cluster IcdManagement | 0x0046 | +| Cluster OvenCavityOperationalState | 0x0048 | |------------------------------------------------------------------------------| | Commands: | | -| * RegisterClient | 0x00 | -| * UnregisterClient | 0x02 | -| * StayActiveRequest | 0x03 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * IdleModeDuration | 0x0000 | -| * ActiveModeDuration | 0x0001 | -| * ActiveModeThreshold | 0x0002 | -| * RegisteredClients | 0x0003 | -| * ICDCounter | 0x0004 | -| * ClientsSupportedPerFabric | 0x0005 | -| * UserActiveModeTriggerHint | 0x0006 | -| * UserActiveModeTriggerInstruction | 0x0007 | -| * OperatingMode | 0x0008 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4607,28 +4491,25 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OnTransitionToActiveMode | 0x0000 | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command RegisterClient + * Command Pause */ -class IcdManagementRegisterClient : public ClusterCommand +class OvenCavityOperationalStatePause : public ClusterCommand { public: - IcdManagementRegisterClient(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("register-client", credsIssuerConfig) + OvenCavityOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); - AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); - AddArgument("Key", &mRequest.key); - AddArgument("VerificationKey", &mRequest.verificationKey); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4637,8 +4518,8 @@ class IcdManagementRegisterClient : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4647,27 +4528,24 @@ class IcdManagementRegisterClient : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type mRequest; }; /* - * Command UnregisterClient + * Command Stop */ -class IcdManagementUnregisterClient : public ClusterCommand +class OvenCavityOperationalStateStop : public ClusterCommand { public: - IcdManagementUnregisterClient(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("unregister-client", credsIssuerConfig) + OvenCavityOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); - AddArgument("VerificationKey", &mRequest.verificationKey); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4676,8 +4554,8 @@ class IcdManagementUnregisterClient : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4686,25 +4564,24 @@ class IcdManagementUnregisterClient : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type mRequest; }; /* - * Command StayActiveRequest + * Command Start */ -class IcdManagementStayActiveRequest : public ClusterCommand +class OvenCavityOperationalStateStart : public ClusterCommand { public: - IcdManagementStayActiveRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("stay-active-request", credsIssuerConfig) + OvenCavityOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4713,8 +4590,8 @@ class IcdManagementStayActiveRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4723,48 +4600,24 @@ class IcdManagementStayActiveRequest : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster Timer | 0x0047 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetTimer | 0x00 | -| * ResetTimer | 0x01 | -| * AddTime | 0x02 | -| * ReduceTime | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SetTime | 0x0000 | -| * TimeRemaining | 0x0001 | -| * TimerState | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetTimer + * Command Resume */ -class TimerSetTimer : public ClusterCommand +class OvenCavityOperationalStateResume : public ClusterCommand { public: - TimerSetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-timer", credsIssuerConfig) + OvenCavityOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) { - AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4773,8 +4626,8 @@ class TimerSetTimer : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4783,24 +4636,46 @@ class TimerSetTimer : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OvenMode | 0x0049 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ResetTimer + * Command ChangeToMode */ -class TimerResetTimer : public ClusterCommand +class OvenModeChangeToMode : public ClusterCommand { public: - TimerResetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-timer", credsIssuerConfig) + OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4809,8 +4684,8 @@ class TimerResetTimer : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4818,26 +4693,67 @@ class TimerResetTimer : public ClusterCommand return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); } -private: - chip::app::Clusters::Timer::Commands::ResetTimer::Type mRequest; -}; +private: + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster LaundryDryerControls | 0x004A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedDrynessLevels | 0x0000 | +| * SelectedDrynessLevel | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ModeSelect | 0x0050 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Command AddTime + * Command ChangeToMode */ -class TimerAddTime : public ClusterCommand +class ModeSelectChangeToMode : public ClusterCommand { public: - TimerAddTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-time", credsIssuerConfig) + ModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4846,8 +4762,8 @@ class TimerAddTime : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4856,25 +4772,47 @@ class TimerAddTime : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster LaundryWasherMode | 0x0051 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ReduceTime + * Command ChangeToMode */ -class TimerReduceTime : public ClusterCommand +class LaundryWasherModeChangeToMode : public ClusterCommand { public: - TimerReduceTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reduce-time", credsIssuerConfig) + LaundryWasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4883,8 +4821,8 @@ class TimerReduceTime : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4893,25 +4831,20 @@ class TimerReduceTime : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OvenCavityOperationalState | 0x0048 | +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4920,25 +4853,26 @@ class TimerReduceTime : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command Pause + * Command ChangeToMode */ -class OvenCavityOperationalStatePause : public ClusterCommand +class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { public: - OvenCavityOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + RefrigeratorAndTemperatureControlledCabinetModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4947,8 +4881,9 @@ class OvenCavityOperationalStatePause : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4957,24 +4892,65 @@ class OvenCavityOperationalStatePause : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster LaundryWasherControls | 0x0053 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster RvcRunMode | 0x0054 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command Stop + * Command ChangeToMode */ -class OvenCavityOperationalStateStop : public ClusterCommand +class RvcRunModeChangeToMode : public ClusterCommand { public: - OvenCavityOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + RvcRunModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4983,8 +4959,8 @@ class OvenCavityOperationalStateStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4993,24 +4969,45 @@ class OvenCavityOperationalStateStop : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster RvcCleanMode | 0x0055 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command Start + * Command ChangeToMode */ -class OvenCavityOperationalStateStart : public ClusterCommand +class RvcCleanModeChangeToMode : public ClusterCommand { public: - OvenCavityOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + RvcCleanModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5019,8 +5016,8 @@ class OvenCavityOperationalStateStart : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5029,24 +5026,50 @@ class OvenCavityOperationalStateStart : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureControl | 0x0056 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetTemperature | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command Resume + * Command SetTemperature */ -class OvenCavityOperationalStateResume : public ClusterCommand +class TemperatureControlSetTemperature : public ClusterCommand { public: - OvenCavityOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + TemperatureControlSetTemperature(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-temperature", credsIssuerConfig) { + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5055,8 +5078,8 @@ class OvenCavityOperationalStateResume : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5065,11 +5088,31 @@ class OvenCavityOperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OvenMode | 0x0049 | +| Cluster RefrigeratorAlarm | 0x0057 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Mask | 0x0000 | +| * State | 0x0002 | +| * Supported | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Notify | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster DishwasherMode | 0x0059 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -5092,10 +5135,10 @@ class OvenCavityOperationalStateResume : public ClusterCommand /* * Command ChangeToMode */ -class OvenModeChangeToMode : public ClusterCommand +class DishwasherModeChangeToMode : public ClusterCommand { public: - OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + DishwasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); @@ -5103,8 +5146,8 @@ class OvenModeChangeToMode : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5113,8 +5156,8 @@ class OvenModeChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5123,17 +5166,16 @@ class OvenModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LaundryDryerControls | 0x004A | +| Cluster AirQuality | 0x005B | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDrynessLevels | 0x0000 | -| * SelectedDrynessLevel | 0x0001 | +| * AirQuality | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5145,18 +5187,25 @@ class OvenModeChangeToMode : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | +| Cluster SmokeCoAlarm | 0x005C | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * SelfTestRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | +| * ExpressedState | 0x0000 | +| * SmokeState | 0x0001 | +| * COState | 0x0002 | +| * BatteryAlert | 0x0003 | +| * DeviceMuted | 0x0004 | +| * TestInProgress | 0x0005 | +| * HardwareFaultAlert | 0x0006 | +| * EndOfServiceAlert | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * ContaminationState | 0x000A | +| * SmokeSensitivityLevel | 0x000B | +| * ExpiryDate | 0x000C | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5165,24 +5214,35 @@ class OvenModeChangeToMode : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SmokeAlarm | 0x0000 | +| * COAlarm | 0x0001 | +| * LowBattery | 0x0002 | +| * HardwareFault | 0x0003 | +| * EndOfService | 0x0004 | +| * SelfTestComplete | 0x0005 | +| * AlarmMuted | 0x0006 | +| * MuteEnded | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * AllClear | 0x000A | \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command SelfTestRequest */ -class ModeSelectChangeToMode : public ClusterCommand +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - ModeSelectChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("self-test-request", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5191,8 +5251,8 @@ class ModeSelectChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5201,20 +5261,21 @@ class ModeSelectChangeToMode : public ClusterCommand } private: - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherMode | 0x0051 | +| Cluster DishwasherAlarm | 0x005D | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * Reset | 0x00 | +| * ModifyEnabledAlarms | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * Mask | 0x0000 | +| * Latch | 0x0001 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5223,25 +5284,25 @@ class ModeSelectChangeToMode : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command Reset */ -class LaundryWasherModeChangeToMode : public ClusterCommand +class DishwasherAlarmReset : public ClusterCommand { public: - LaundryWasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("change-to-mode", credsIssuerConfig) + DishwasherAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5250,8 +5311,8 @@ class LaundryWasherModeChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5260,20 +5321,78 @@ class LaundryWasherModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; +}; + +/* + * Command ModifyEnabledAlarms + */ +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand +{ +public: + DishwasherAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("modify-enabled-alarms", credsIssuerConfig) + { + AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster MicrowaveOvenMode | 0x005E | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenControl | 0x005F | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5285,23 +5404,24 @@ class LaundryWasherModeChangeToMode : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command SetCookingParameters */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("change-to-mode", credsIssuerConfig) + MicrowaveOvenControlSetCookingParameters(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-cooking-parameters", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); + AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); + AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5310,9 +5430,46 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; +}; + +/* + * Command AddMoreTime + */ +class MicrowaveOvenControlAddMoreTime : public ClusterCommand +{ +public: + MicrowaveOvenControlAddMoreTime(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-more-time", credsIssuerConfig) + { + AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5321,39 +5478,25 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust } private: - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherControls | 0x0053 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * SupportedRinses | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster RvcRunMode | 0x0054 | +| Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5362,24 +5505,25 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command Pause */ -class RvcRunModeChangeToMode : public ClusterCommand +class OperationalStatePause : public ClusterCommand { public: - RvcRunModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + OperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5388,8 +5532,8 @@ class RvcRunModeChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5398,45 +5542,24 @@ class RvcRunModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Pause::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster RvcCleanMode | 0x0055 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ChangeToMode + * Command Stop */ -class RvcCleanModeChangeToMode : public ClusterCommand +class OperationalStateStop : public ClusterCommand { public: - RvcCleanModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + OperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5445,8 +5568,8 @@ class RvcCleanModeChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5455,50 +5578,24 @@ class RvcCleanModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Stop::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetTemperature | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * SelectedTemperatureLevel | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetTemperature + * Command Start */ -class TemperatureControlSetTemperature : public ClusterCommand +class OperationalStateStart : public ClusterCommand { public: - TemperatureControlSetTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-temperature", credsIssuerConfig) + OperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) { - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5507,8 +5604,8 @@ class TemperatureControlSetTemperature : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5517,66 +5614,24 @@ class TemperatureControlSetTemperature : public ClusterCommand } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Start::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Notify | 0x0000 | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster DishwasherMode | 0x0059 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ChangeToMode + * Command Resume */ -class DishwasherModeChangeToMode : public ClusterCommand +class OperationalStateResume : public ClusterCommand { public: - DishwasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + OperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5585,8 +5640,8 @@ class DishwasherModeChangeToMode : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5595,83 +5650,52 @@ class DishwasherModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Resume::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AirQuality | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | +| Cluster RvcOperationalState | 0x0061 | |------------------------------------------------------------------------------| | Commands: | | -| * SelfTestRequest | 0x00 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SmokeSensitivityLevel | 0x000B | -| * ExpiryDate | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command SelfTestRequest + * Command Pause */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand +class RvcOperationalStatePause : public ClusterCommand { public: - SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("self-test-request", credsIssuerConfig) + RvcOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5680,8 +5704,8 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5690,48 +5714,24 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand } private: - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Pause::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster DishwasherAlarm | 0x005D | -|------------------------------------------------------------------------------| -| Commands: | | -| * Reset | 0x00 | -| * ModifyEnabledAlarms | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Mask | 0x0000 | -| * Latch | 0x0001 | -| * State | 0x0002 | -| * Supported | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Notify | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Command Reset + * Command Stop */ -class DishwasherAlarmReset : public ClusterCommand +class RvcOperationalStateStop : public ClusterCommand { public: - DishwasherAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", credsIssuerConfig) + RvcOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) { - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5740,8 +5740,8 @@ class DishwasherAlarmReset : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5750,26 +5750,24 @@ class DishwasherAlarmReset : public ClusterCommand } private: - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Stop::Type mRequest; }; /* - * Command ModifyEnabledAlarms + * Command Start */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand +class RvcOperationalStateStart : public ClusterCommand { public: - DishwasherAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("modify-enabled-alarms", credsIssuerConfig) + RvcOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) { - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5778,8 +5776,8 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5788,40 +5786,69 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand } private: - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Start::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenMode | 0x005E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +/* + * Command Resume + */ +class RvcOperationalStateResume : public ClusterCommand +{ +public: + RvcOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::RvcOperationalState::Commands::Resume::Type mRequest; +}; /*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenControl | 0x005F | +| Cluster ScenesManagement | 0x0062 | |------------------------------------------------------------------------------| | Commands: | | -| * SetCookingParameters | 0x00 | -| * AddMoreTime | 0x01 | +| * AddScene | 0x00 | +| * ViewScene | 0x01 | +| * RemoveScene | 0x02 | +| * RemoveAllScenes | 0x03 | +| * StoreScene | 0x04 | +| * RecallScene | 0x05 | +| * GetSceneMembership | 0x06 | +| * EnhancedAddScene | 0x40 | +| * EnhancedViewScene | 0x41 | +| * CopyScene | 0x42 | |------------------------------------------------------------------------------| | Attributes: | | -| * CookTime | 0x0001 | -| * PowerSetting | 0x0002 | -| * MinPower | 0x0003 | -| * MaxPower | 0x0004 | -| * PowerStep | 0x0005 | +| * SceneCount | 0x0000 | +| * CurrentScene | 0x0001 | +| * CurrentGroup | 0x0002 | +| * SceneValid | 0x0003 | +| * NameSupport | 0x0004 | +| * LastConfiguredBy | 0x0005 | +| * SceneTableSize | 0x0006 | +| * FabricSceneInfo | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5833,24 +5860,26 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SetCookingParameters + * Command AddScene */ -class MicrowaveOvenControlSetCookingParameters : public ClusterCommand +class ScenesManagementAddScene : public ClusterCommand { public: - MicrowaveOvenControlSetCookingParameters(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-cooking-parameters", credsIssuerConfig) + ScenesManagementAddScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); - AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); - AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("SceneName", &mRequest.sceneName); + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::AddScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5859,8 +5888,8 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::AddScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5869,26 +5898,28 @@ class MicrowaveOvenControlSetCookingParameters : public ClusterCommand } private: - chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::AddScene::Type mRequest; + TypedComplexArgument> + mComplex_ExtensionFieldSets; }; /* - * Command AddMoreTime + * Command ViewScene */ -class MicrowaveOvenControlAddMoreTime : public ClusterCommand +class ScenesManagementViewScene : public ClusterCommand { public: - MicrowaveOvenControlAddMoreTime(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-more-time", credsIssuerConfig) + ScenesManagementViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-scene", credsIssuerConfig) { - AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::ViewScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5897,8 +5928,8 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::ViewScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5907,52 +5938,26 @@ class MicrowaveOvenControlAddMoreTime : public ClusterCommand } private: - chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command Pause + * Command RemoveScene */ -class OperationalStatePause : public ClusterCommand +class ScenesManagementRemoveScene : public ClusterCommand { public: - OperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + ScenesManagementRemoveScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-scene", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5961,8 +5966,8 @@ class OperationalStatePause : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5971,24 +5976,26 @@ class OperationalStatePause : public ClusterCommand } private: - chip::app::Clusters::OperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Type mRequest; }; /* - * Command Stop + * Command RemoveAllScenes */ -class OperationalStateStop : public ClusterCommand +class ScenesManagementRemoveAllScenes : public ClusterCommand { public: - OperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + ScenesManagementRemoveAllScenes(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-all-scenes", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5997,8 +6004,8 @@ class OperationalStateStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6007,24 +6014,26 @@ class OperationalStateStop : public ClusterCommand } private: - chip::app::Clusters::OperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type mRequest; }; /* - * Command Start + * Command StoreScene */ -class OperationalStateStart : public ClusterCommand +class ScenesManagementStoreScene : public ClusterCommand { public: - OperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + ScenesManagementStoreScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("store-scene", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::StoreScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6033,8 +6042,8 @@ class OperationalStateStart : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::StoreScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6043,24 +6052,27 @@ class OperationalStateStart : public ClusterCommand } private: - chip::app::Clusters::OperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type mRequest; }; /* - * Command Resume + * Command RecallScene */ -class OperationalStateResume : public ClusterCommand +class ScenesManagementRecallScene : public ClusterCommand { public: - OperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + ScenesManagementRecallScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("recall-scene", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RecallScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6069,8 +6081,8 @@ class OperationalStateResume : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RecallScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6079,52 +6091,26 @@ class OperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::OperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster RvcOperationalState | 0x0061 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command Pause + * Command GetSceneMembership */ -class RvcOperationalStatePause : public ClusterCommand +class ScenesManagementGetSceneMembership : public ClusterCommand { public: - RvcOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", credsIssuerConfig) + ScenesManagementGetSceneMembership(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-scene-membership", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6133,8 +6119,8 @@ class RvcOperationalStatePause : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6143,24 +6129,30 @@ class RvcOperationalStatePause : public ClusterCommand } private: - chip::app::Clusters::RvcOperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type mRequest; }; /* - * Command Stop + * Command EnhancedAddScene */ -class RvcOperationalStateStop : public ClusterCommand +class ScenesManagementEnhancedAddScene : public ClusterCommand { public: - RvcOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + ScenesManagementEnhancedAddScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("SceneName", &mRequest.sceneName); + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6169,8 +6161,8 @@ class RvcOperationalStateStop : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6179,24 +6171,29 @@ class RvcOperationalStateStop : public ClusterCommand } private: - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Type mRequest; + TypedComplexArgument> + mComplex_ExtensionFieldSets; }; /* - * Command Start + * Command EnhancedViewScene */ -class RvcOperationalStateStart : public ClusterCommand +class ScenesManagementEnhancedViewScene : public ClusterCommand { public: - RvcOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + ScenesManagementEnhancedViewScene(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("enhanced-view-scene", credsIssuerConfig) { + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6205,8 +6202,8 @@ class RvcOperationalStateStart : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6215,24 +6212,29 @@ class RvcOperationalStateStart : public ClusterCommand } private: - chip::app::Clusters::RvcOperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Type mRequest; }; /* - * Command Resume + * Command CopyScene */ -class RvcOperationalStateResume : public ClusterCommand +class ScenesManagementCopyScene : public ClusterCommand { public: - RvcOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + ScenesManagementCopyScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("copy-scene", credsIssuerConfig) { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); + AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); + AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); + AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::CopyScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -6241,8 +6243,8 @@ class RvcOperationalStateResume : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::CopyScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -6251,7 +6253,7 @@ class RvcOperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::RvcOperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -14552,101 +14554,6 @@ void registerClusterGroups(Commands & commands, CredentialIssuerCommands * creds commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterScenes(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::Scenes; - - const char * clusterName = "Scenes"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // - make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // - make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // - make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // - make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // - make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "scene-count", 0, UINT8_MAX, Attributes::SceneCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-scene", 0, UINT8_MAX, Attributes::CurrentScene::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-group", 0, UINT16_MAX, Attributes::CurrentGroup::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "scene-valid", 0, 1, Attributes::SceneValid::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "last-configured-by", 0, UINT64_MAX, Attributes::LastConfiguredBy::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "scene-table-size", 0, UINT16_MAX, Attributes::SceneTableSize::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique< - WriteAttributeAsComplex>>( - Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // - make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // - make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // - make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // - make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // - make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // - make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::OnOff; @@ -19501,6 +19408,101 @@ void registerClusterRvcOperationalState(Commands & commands, CredentialIssuerCom commands.RegisterCluster(clusterName, clusterCommands); } +void registerClusterScenesManagement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ScenesManagement; + + const char * clusterName = "ScenesManagement"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // + make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // + make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // + make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // + make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>(Id, "scene-count", 0, UINT8_MAX, Attributes::SceneCount::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-scene", 0, UINT8_MAX, Attributes::CurrentScene::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-group", 0, UINT16_MAX, Attributes::CurrentGroup::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "scene-valid", 0, 1, Attributes::SceneValid::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "name-support", 0, UINT8_MAX, Attributes::NameSupport::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "last-configured-by", 0, UINT64_MAX, Attributes::LastConfiguredBy::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>(Id, "scene-table-size", 0, UINT16_MAX, Attributes::SceneTableSize::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "scene-count", Attributes::SceneCount::Id, credsIssuerConfig), // + make_unique(Id, "current-scene", Attributes::CurrentScene::Id, credsIssuerConfig), // + make_unique(Id, "current-group", Attributes::CurrentGroup::Id, credsIssuerConfig), // + make_unique(Id, "scene-valid", Attributes::SceneValid::Id, credsIssuerConfig), // + make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // + make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // + make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} void registerClusterHepaFilterMonitoring(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::HepaFilterMonitoring; @@ -26069,7 +26071,6 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterAny(commands, credsIssuerConfig); registerClusterIdentify(commands, credsIssuerConfig); registerClusterGroups(commands, credsIssuerConfig); - registerClusterScenes(commands, credsIssuerConfig); registerClusterOnOff(commands, credsIssuerConfig); registerClusterOnOffSwitchConfiguration(commands, credsIssuerConfig); registerClusterLevelControl(commands, credsIssuerConfig); @@ -26128,6 +26129,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterMicrowaveOvenControl(commands, credsIssuerConfig); registerClusterOperationalState(commands, credsIssuerConfig); registerClusterRvcOperationalState(commands, credsIssuerConfig); + registerClusterScenesManagement(commands, credsIssuerConfig); registerClusterHepaFilterMonitoring(commands, credsIssuerConfig); registerClusterActivatedCarbonFilterMonitoring(commands, credsIssuerConfig); registerClusterBooleanStateConfiguration(commands, credsIssuerConfig); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 8c8d4b57d3c2e8..a408c656cbb2a8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -220,129 +220,6 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::detail::Structs::Opera ComplexArgumentParser::Finalize(request.operationalStateLabel); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("AttributeValuePair.attributeID", "attributeID", value.isMember("attributeID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AttributeValuePair.attributeValue", "attributeValue", - value.isMember("attributeValue"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeID"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeID, value["attributeID"])); - valueCopy.removeMember("attributeID"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValue"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeValue, value["attributeValue"])); - valueCopy.removeMember("attributeValue"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request) -{ - ComplexArgumentParser::Finalize(request.attributeID); - ComplexArgumentParser::Finalize(request.attributeValue); -} - -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ExtensionFieldSet.clusterID", "clusterID", value.isMember("clusterID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionFieldSet.attributeValueList", "attributeValueList", - value.isMember("attributeValueList"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clusterID"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clusterID, value["clusterID"])); - valueCopy.removeMember("clusterID"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValueList"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeValueList, value["attributeValueList"])); - valueCopy.removeMember("attributeValueList"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request) -{ - ComplexArgumentParser::Finalize(request.clusterID); - ComplexArgumentParser::Finalize(request.attributeValueList); -} - -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request, - Json::Value & value) -{ - VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - - // Copy to track which members we already processed. - Json::Value valueCopy(value); - - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneCount", "sceneCount", value.isMember("sceneCount"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentScene", "currentScene", value.isMember("currentScene"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentGroup", "currentGroup", value.isMember("currentGroup"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneValid", "sceneValid", value.isMember("sceneValid"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.remainingCapacity", "remainingCapacity", - value.isMember("remainingCapacity"))); - - char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneCount"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneCount, value["sceneCount"])); - valueCopy.removeMember("sceneCount"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentScene"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentScene, value["currentScene"])); - valueCopy.removeMember("currentScene"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentGroup"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentGroup, value["currentGroup"])); - valueCopy.removeMember("currentGroup"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneValid"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneValid, value["sceneValid"])); - valueCopy.removeMember("sceneValid"); - - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "remainingCapacity"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.remainingCapacity, value["remainingCapacity"])); - valueCopy.removeMember("remainingCapacity"); - - if (value.isMember("fabricIndex")) - { - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); - } - valueCopy.removeMember("fabricIndex"); - - return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); -} - -void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request) -{ - ComplexArgumentParser::Finalize(request.sceneCount); - ComplexArgumentParser::Finalize(request.currentScene); - ComplexArgumentParser::Finalize(request.currentGroup); - ComplexArgumentParser::Finalize(request.sceneValid); - ComplexArgumentParser::Finalize(request.remainingCapacity); - ComplexArgumentParser::Finalize(request.fabricIndex); -} - CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::Type & request, Json::Value & value) @@ -2151,6 +2028,131 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ModeSelect::Structs::M ComplexArgumentParser::Finalize(request.semanticTags); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AttributeValuePair.attributeID", "attributeID", value.isMember("attributeID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AttributeValuePair.attributeValue", "attributeValue", + value.isMember("attributeValue"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeID, value["attributeID"])); + valueCopy.removeMember("attributeID"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValue"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeValue, value["attributeValue"])); + valueCopy.removeMember("attributeValue"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type & request) +{ + ComplexArgumentParser::Finalize(request.attributeID); + ComplexArgumentParser::Finalize(request.attributeValue); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ExtensionFieldSet.clusterID", "clusterID", value.isMember("clusterID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ExtensionFieldSet.attributeValueList", "attributeValueList", + value.isMember("attributeValueList"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clusterID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clusterID, value["clusterID"])); + valueCopy.removeMember("clusterID"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValueList"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeValueList, value["attributeValueList"])); + valueCopy.removeMember("attributeValueList"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type & request) +{ + ComplexArgumentParser::Finalize(request.clusterID); + ComplexArgumentParser::Finalize(request.attributeValueList); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneCount", "sceneCount", value.isMember("sceneCount"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentScene", "currentScene", value.isMember("currentScene"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentGroup", "currentGroup", value.isMember("currentGroup"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneValid", "sceneValid", value.isMember("sceneValid"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.remainingCapacity", "remainingCapacity", + value.isMember("remainingCapacity"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneCount"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneCount, value["sceneCount"])); + valueCopy.removeMember("sceneCount"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentScene"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentScene, value["currentScene"])); + valueCopy.removeMember("currentScene"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentGroup"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentGroup, value["currentGroup"])); + valueCopy.removeMember("currentGroup"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneValid"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneValid, value["sceneValid"])); + valueCopy.removeMember("sceneValid"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "remainingCapacity"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.remainingCapacity, value["remainingCapacity"])); + valueCopy.removeMember("remainingCapacity"); + + if (value.isMember("fabricIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); + } + valueCopy.removeMember("fabricIndex"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.sceneCount); + ComplexArgumentParser::Finalize(request.currentScene); + ComplexArgumentParser::Finalize(request.currentGroup); + ComplexArgumentParser::Finalize(request.sceneValid); + ComplexArgumentParser::Finalize(request.remainingCapacity); + ComplexArgumentParser::Finalize(request.fabricIndex); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::Type & request, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 6bb98bb03a2cd3..3af522eef41dea 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -51,21 +51,6 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs static void Finalize(chip::app::Clusters::detail::Structs::OperationalStateStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request); - -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request); - -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request, - Json::Value & value); - -static void Finalize(chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request); - static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::Type & request, Json::Value & value); @@ -264,6 +249,21 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ModeSelect::Str static void Finalize(chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 3c49f3129db325..8b045be0c9ff46 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -187,113 +187,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("AttributeID", indent + 1, value.attributeID); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeID'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("AttributeValue", indent + 1, value.attributeValue); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeValue'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("ClusterID", indent + 1, value.clusterID); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClusterID'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("AttributeValueList", indent + 1, value.attributeValueList); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeValueList'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = LogValue("SceneCount", indent + 1, value.sceneCount); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneCount'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("CurrentScene", indent + 1, value.currentScene); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentScene'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("CurrentGroup", indent + 1, value.currentGroup); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentGroup'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("SceneValid", indent + 1, value.sceneValid); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneValid'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("RemainingCapacity", indent + 1, value.remainingCapacity); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RemainingCapacity'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value) { @@ -1933,6 +1826,114 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("AttributeID", indent + 1, value.attributeID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeID'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("AttributeValue", indent + 1, value.attributeValue); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeValue'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("ClusterID", indent + 1, value.clusterID); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClusterID'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("AttributeValueList", indent + 1, value.attributeValueList); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeValueList'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("SceneCount", indent + 1, value.sceneCount); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneCount'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentScene", indent + 1, value.currentScene); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentScene'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentGroup", indent + 1, value.currentGroup); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentGroup'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("SceneValid", indent + 1, value.sceneValid); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneValid'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("RemainingCapacity", indent + 1, value.remainingCapacity); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RemainingCapacity'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType & value) @@ -6859,102 +6860,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::AddSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::ViewSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); - ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::RemoveSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::RemoveAllScenesResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::StoreSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::GetSceneMembershipResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneList", indent + 1, value.sceneList)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::EnhancedAddSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::EnhancedViewSceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); - ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); - ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Scenes::Commands::CopySceneResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupIdentifierFrom", indent + 1, value.groupIdentifierFrom)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdentifierFrom", indent + 1, value.sceneIdentifierFrom)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & value) { @@ -7103,123 +7008,219 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalCredentials::Commands::NOCResponse::DecodableType & value) + const OperationalCredentials::Commands::NOCResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusCode", indent + 1, value.statusCode)); + ReturnErrorOnFailure(DataModelLogger::LogValue("fabricIndex", indent + 1, value.fabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySet", indent + 1, value.groupKeySet)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySetIDs", indent + 1, value.groupKeySetIDs)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Commands::RegisterClientResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("ICDCounter", indent + 1, value.ICDCounter)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Commands::StayActiveResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("promisedActiveDuration", indent + 1, value.promisedActiveDuration)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OvenMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const RvcRunMode::Commands::ChangeToModeResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusCode", indent + 1, value.statusCode)); - ReturnErrorOnFailure(DataModelLogger::LogValue("fabricIndex", indent + 1, value.fabricIndex)); - ReturnErrorOnFailure(DataModelLogger::LogValue("debugText", indent + 1, value.debugText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & value) + const RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySet", indent + 1, value.groupKeySet)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value) + const DishwasherMode::Commands::ChangeToModeResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupKeySetIDs", indent + 1, value.groupKeySetIDs)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const IcdManagement::Commands::RegisterClientResponse::DecodableType & value) + const OperationalState::Commands::OperationalCommandResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("ICDCounter", indent + 1, value.ICDCounter)); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const IcdManagement::Commands::StayActiveResponse::DecodableType & value) + const RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("promisedActiveDuration", indent + 1, value.promisedActiveDuration)); + ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType & value) + const ScenesManagement::Commands::AddSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OvenMode::Commands::ChangeToModeResponse::DecodableType & value) + const ScenesManagement::Commands::ViewSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); + ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value) + const ScenesManagement::Commands::RemoveSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue( - const char * label, size_t indent, - const RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcRunMode::Commands::ChangeToModeResponse::DecodableType & value) + const ScenesManagement::Commands::StoreSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcCleanMode::Commands::ChangeToModeResponse::DecodableType & value) + const ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("capacity", indent + 1, value.capacity)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneList", indent + 1, value.sceneList)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const DishwasherMode::Commands::ChangeToModeResponse::DecodableType & value) + const ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const OperationalState::Commands::OperationalCommandResponse::DecodableType & value) + const ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("transitionTime", indent + 1, value.transitionTime)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneName", indent + 1, value.sceneName)); + ReturnErrorOnFailure(DataModelLogger::LogValue("extensionFieldSets", indent + 1, value.extensionFieldSets)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value) + const ScenesManagement::Commands::CopySceneResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("commandResponseState", indent + 1, value.commandResponseState)); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupIdentifierFrom", indent + 1, value.groupIdentifierFrom)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdentifierFrom", indent + 1, value.sceneIdentifierFrom)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -7685,82 +7686,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case Scenes::Id: { - switch (path.mAttributeId) - { - case Scenes::Attributes::SceneCount::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneCount", 1, value); - } - case Scenes::Attributes::CurrentScene::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentScene", 1, value); - } - case Scenes::Attributes::CurrentGroup::Id: { - chip::GroupId value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentGroup", 1, value); - } - case Scenes::Attributes::SceneValid::Id: { - bool value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneValid", 1, value); - } - case Scenes::Attributes::NameSupport::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NameSupport", 1, value); - } - case Scenes::Attributes::LastConfiguredBy::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("LastConfiguredBy", 1, value); - } - case Scenes::Attributes::SceneTableSize::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SceneTableSize", 1, value); - } - case Scenes::Attributes::FabricSceneInfo::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FabricSceneInfo", 1, value); - } - case Scenes::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GeneratedCommandList", 1, value); - } - case Scenes::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AcceptedCommandList", 1, value); - } - case Scenes::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case Scenes::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AttributeList", 1, value); - } - case Scenes::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case Scenes::Attributes::ClusterRevision::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } - } - break; - } case OnOff::Id: { switch (path.mAttributeId) { @@ -11739,6 +11664,83 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case ScenesManagement::Id: { + switch (path.mAttributeId) + { + case ScenesManagement::Attributes::SceneCount::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneCount", 1, value); + } + case ScenesManagement::Attributes::CurrentScene::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentScene", 1, value); + } + case ScenesManagement::Attributes::CurrentGroup::Id: { + chip::GroupId value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentGroup", 1, value); + } + case ScenesManagement::Attributes::SceneValid::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneValid", 1, value); + } + case ScenesManagement::Attributes::NameSupport::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NameSupport", 1, value); + } + case ScenesManagement::Attributes::LastConfiguredBy::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("LastConfiguredBy", 1, value); + } + case ScenesManagement::Attributes::SceneTableSize::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SceneTableSize", 1, value); + } + case ScenesManagement::Attributes::FabricSceneInfo::Id: { + chip::app::DataModel::DecodableList + value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FabricSceneInfo", 1, value); + } + case ScenesManagement::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ScenesManagement::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ScenesManagement::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ScenesManagement::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case ScenesManagement::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ScenesManagement::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case HepaFilterMonitoring::Id: { switch (path.mAttributeId) { @@ -17314,57 +17316,6 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } - case Scenes::Id: { - switch (path.mCommandId) - { - case Scenes::Commands::AddSceneResponse::Id: { - Scenes::Commands::AddSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AddSceneResponse", 1, value); - } - case Scenes::Commands::ViewSceneResponse::Id: { - Scenes::Commands::ViewSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ViewSceneResponse", 1, value); - } - case Scenes::Commands::RemoveSceneResponse::Id: { - Scenes::Commands::RemoveSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemoveSceneResponse", 1, value); - } - case Scenes::Commands::RemoveAllScenesResponse::Id: { - Scenes::Commands::RemoveAllScenesResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemoveAllScenesResponse", 1, value); - } - case Scenes::Commands::StoreSceneResponse::Id: { - Scenes::Commands::StoreSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("StoreSceneResponse", 1, value); - } - case Scenes::Commands::GetSceneMembershipResponse::Id: { - Scenes::Commands::GetSceneMembershipResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GetSceneMembershipResponse", 1, value); - } - case Scenes::Commands::EnhancedAddSceneResponse::Id: { - Scenes::Commands::EnhancedAddSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EnhancedAddSceneResponse", 1, value); - } - case Scenes::Commands::EnhancedViewSceneResponse::Id: { - Scenes::Commands::EnhancedViewSceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EnhancedViewSceneResponse", 1, value); - } - case Scenes::Commands::CopySceneResponse::Id: { - Scenes::Commands::CopySceneResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CopySceneResponse", 1, value); - } - } - break; - } case OtaSoftwareUpdateProvider::Id: { switch (path.mCommandId) { @@ -17618,6 +17569,57 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } + case ScenesManagement::Id: { + switch (path.mCommandId) + { + case ScenesManagement::Commands::AddSceneResponse::Id: { + ScenesManagement::Commands::AddSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AddSceneResponse", 1, value); + } + case ScenesManagement::Commands::ViewSceneResponse::Id: { + ScenesManagement::Commands::ViewSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ViewSceneResponse", 1, value); + } + case ScenesManagement::Commands::RemoveSceneResponse::Id: { + ScenesManagement::Commands::RemoveSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemoveSceneResponse", 1, value); + } + case ScenesManagement::Commands::RemoveAllScenesResponse::Id: { + ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemoveAllScenesResponse", 1, value); + } + case ScenesManagement::Commands::StoreSceneResponse::Id: { + ScenesManagement::Commands::StoreSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StoreSceneResponse", 1, value); + } + case ScenesManagement::Commands::GetSceneMembershipResponse::Id: { + ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GetSceneMembershipResponse", 1, value); + } + case ScenesManagement::Commands::EnhancedAddSceneResponse::Id: { + ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EnhancedAddSceneResponse", 1, value); + } + case ScenesManagement::Commands::EnhancedViewSceneResponse::Id: { + ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EnhancedViewSceneResponse", 1, value); + } + case ScenesManagement::Commands::CopySceneResponse::Id: { + ScenesManagement::Commands::CopySceneResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CopySceneResponse", 1, value); + } + } + break; + } case EnergyEvse::Id: { switch (path.mCommandId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 8fd0f2dec21890..559b6e7a21f5c0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -38,15 +38,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::detail::Structs::OperationalStateStruct::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType & value); - -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value); - -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value); - static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value); @@ -165,6 +156,15 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ModeSelect::Structs::ModeOptionStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::AttributeValuePair::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Structs::SceneInfoStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType & value); @@ -599,24 +599,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & value); @@ -687,6 +669,25 @@ LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 68db98302b2269..b465678ccd9fe0 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -39,7 +39,6 @@ |---------------------------------------------------------------------+--------| | Identify | 0x0003 | | Groups | 0x0004 | -| Scenes | 0x0005 | | OnOff | 0x0006 | | OnOffSwitchConfiguration | 0x0007 | | LevelControl | 0x0008 | @@ -98,6 +97,7 @@ | MicrowaveOvenControl | 0x005F | | OperationalState | 0x0060 | | RvcOperationalState | 0x0061 | +| ScenesManagement | 0x0062 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | | BooleanStateConfiguration | 0x0080 | @@ -1888,29 +1888,22 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster Scenes | 0x0005 | +| Cluster OnOff | 0x0006 | |------------------------------------------------------------------------------| | Commands: | | -| * AddScene | 0x00 | -| * ViewScene | 0x01 | -| * RemoveScene | 0x02 | -| * RemoveAllScenes | 0x03 | -| * StoreScene | 0x04 | -| * RecallScene | 0x05 | -| * GetSceneMembership | 0x06 | -| * EnhancedAddScene | 0x40 | -| * EnhancedViewScene | 0x41 | -| * CopyScene | 0x42 | +| * Off | 0x00 | +| * On | 0x01 | +| * Toggle | 0x02 | +| * OffWithEffect | 0x40 | +| * OnWithRecallGlobalScene | 0x41 | +| * OnWithTimedOff | 0x42 | |------------------------------------------------------------------------------| | Attributes: | | -| * SceneCount | 0x0000 | -| * CurrentScene | 0x0001 | -| * CurrentGroup | 0x0002 | -| * SceneValid | 0x0003 | -| * NameSupport | 0x0004 | -| * LastConfiguredBy | 0x0005 | -| * SceneTableSize | 0x0006 | -| * FabricSceneInfo | 0x0007 | +| * OnOff | 0x0000 | +| * GlobalSceneControl | 0x4000 | +| * OnTime | 0x4001 | +| * OffWaitTime | 0x4002 | +| * StartUpOnOff | 0x4003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -1922,646 +1915,310 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command AddScene - */ -class ScenesAddScene : public ClusterCommand { -public: - ScenesAddScene() - : ClusterCommand("add-scene") - , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) - { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::AddScene::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.extensionFieldSets) { - MTRScenesClusterExtensionFieldSet * newElement_0; - newElement_0 = [MTRScenesClusterExtensionFieldSet new]; - newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.attributeValueList) { - MTRScenesClusterAttributeValuePair * newElement_2; - newElement_2 = [MTRScenesClusterAttributeValuePair new]; - newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; - newElement_2.attributeValue = [NSNumber numberWithUnsignedInt:entry_2.attributeValue]; - [array_2 addObject:newElement_2]; - } - newElement_0.attributeValueList = array_2; - } - [array_0 addObject:newElement_0]; - } - params.extensionFieldSets = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Scenes::Commands::AddScene::Type mRequest; - TypedComplexArgument> mComplex_ExtensionFieldSets; -}; - -/* - * Command ViewScene - */ -class ScenesViewScene : public ClusterCommand { -public: - ScenesViewScene() - : ClusterCommand("view-scene") - { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::ViewScene::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterViewSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster viewSceneWithParams:params completion: - ^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Scenes::Commands::ViewScene::Type mRequest; -}; - -/* - * Command RemoveScene - */ -class ScenesRemoveScene : public ClusterCommand { -public: - ScenesRemoveScene() - : ClusterCommand("remove-scene") - { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveScene::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterRemoveSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeSceneWithParams:params completion: - ^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Scenes::Commands::RemoveScene::Type mRequest; -}; - -/* - * Command RemoveAllScenes - */ -class ScenesRemoveAllScenes : public ClusterCommand { -public: - ScenesRemoveAllScenes() - : ClusterCommand("remove-all-scenes") - { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeAllScenesWithParams:params completion: - ^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type mRequest; -}; - -/* - * Command StoreScene + * Command Off */ -class ScenesStoreScene : public ClusterCommand { +class OnOffOff : public ClusterCommand { public: - ScenesStoreScene() - : ClusterCommand("store-scene") + OnOffOff() + : ClusterCommand("off") { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::StoreScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterStoreSceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster storeSceneWithParams:params completion: - ^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster offWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::StoreScene::Type mRequest; }; /* - * Command RecallScene + * Command On */ -class ScenesRecallScene : public ClusterCommand { +class OnOffOn : public ClusterCommand { public: - ScenesRecallScene() - : ClusterCommand("recall-scene") + OnOffOn() + : ClusterCommand("on") { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::RecallScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterOnParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; - if (mRequest.transitionTime.HasValue()) { - if (mRequest.transitionTime.Value().IsNull()) { - params.transitionTime = nil; - } else { - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime.Value().Value()]; - } - } else { - params.transitionTime = nil; - } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster recallSceneWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster onWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::RecallScene::Type mRequest; }; /* - * Command GetSceneMembership + * Command Toggle */ -class ScenesGetSceneMembership : public ClusterCommand { +class OnOffToggle : public ClusterCommand { public: - ScenesGetSceneMembership() - : ClusterCommand("get-scene-membership") + OnOffToggle() + : ClusterCommand("toggle") { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::GetSceneMembership::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterToggleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster toggleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type mRequest; }; /* - * Command EnhancedAddScene + * Command OffWithEffect */ -class ScenesEnhancedAddScene : public ClusterCommand { +class OnOffOffWithEffect : public ClusterCommand { public: - ScenesEnhancedAddScene() - : ClusterCommand("enhanced-add-scene") - , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + OnOffOffWithEffect() + : ClusterCommand("off-with-effect") { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("SceneName", &mRequest.sceneName); - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); + AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); + AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterOffWithEffectParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.extensionFieldSets) { - MTRScenesClusterExtensionFieldSet * newElement_0; - newElement_0 = [MTRScenesClusterExtensionFieldSet new]; - newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.attributeValueList) { - MTRScenesClusterAttributeValuePair * newElement_2; - newElement_2 = [MTRScenesClusterAttributeValuePair new]; - newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; - newElement_2.attributeValue = [NSNumber numberWithUnsignedInt:entry_2.attributeValue]; - [array_2 addObject:newElement_2]; - } - newElement_0.attributeValueList = array_2; - } - [array_0 addObject:newElement_0]; - } - params.extensionFieldSets = array_0; - } + params.effectIdentifier = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.effectIdentifier)]; + params.effectVariant = [NSNumber numberWithUnsignedChar:mRequest.effectVariant]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enhancedAddSceneWithParams:params completion: - ^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster offWithEffectWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type mRequest; - TypedComplexArgument> mComplex_ExtensionFieldSets; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; }; /* - * Command EnhancedViewScene + * Command OnWithRecallGlobalScene */ -class ScenesEnhancedViewScene : public ClusterCommand { +class OnOffOnWithRecallGlobalScene : public ClusterCommand { public: - ScenesEnhancedViewScene() - : ClusterCommand("enhanced-view-scene") + OnOffOnWithRecallGlobalScene() + : ClusterCommand("on-with-recall-global-scene") { - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enhancedViewSceneWithParams:params completion: - ^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster onWithRecallGlobalSceneWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type mRequest; }; /* - * Command CopyScene + * Command OnWithTimedOff */ -class ScenesCopyScene : public ClusterCommand { +class OnOffOnWithTimedOff : public ClusterCommand { public: - ScenesCopyScene() - : ClusterCommand("copy-scene") + OnOffOnWithTimedOff() + : ClusterCommand("on-with-timed-off") { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); - AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); - AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); - AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); + AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); + AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); + AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Scenes::Commands::CopyScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesClusterCopySceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:mRequest.mode.Raw()]; - params.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierFrom]; - params.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierFrom]; - params.groupIdentifierTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierTo]; - params.sceneIdentifierTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierTo]; + params.onOffControl = [NSNumber numberWithUnsignedChar:mRequest.onOffControl.Raw()]; + params.onTime = [NSNumber numberWithUnsignedShort:mRequest.onTime]; + params.offWaitTime = [NSNumber numberWithUnsignedShort:mRequest.offWaitTime]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster copySceneWithParams:params completion: - ^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster onWithTimedOffWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Scenes::Commands::CopyScene::Type mRequest; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; }; /* - * Attribute SceneCount + * Attribute OnOff */ -class ReadScenesSceneCount : public ReadAttribute { +class ReadOnOffOnOff : public ReadAttribute { public: - ReadScenesSceneCount() - : ReadAttribute("scene-count") + ReadOnOffOnOff() + : ReadAttribute("on-off") { } - ~ReadScenesSceneCount() + ~ReadOnOffOnOff() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.OnOff response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes SceneCount read Error", error); + LogNSError("OnOff OnOff read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -2570,25 +2227,25 @@ class ReadScenesSceneCount : public ReadAttribute { } }; -class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { +class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { public: - SubscribeAttributeScenesSceneCount() - : SubscribeAttribute("scene-count") + SubscribeAttributeOnOffOnOff() + : SubscribeAttribute("on-off") { } - ~SubscribeAttributeScenesSceneCount() + ~SubscribeAttributeOnOffOnOff() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -2599,10 +2256,10 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSceneCountWithParams:params + [cluster subscribeAttributeOnOffWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneCount response %@", [value description]); + NSLog(@"OnOff.OnOff response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -2616,34 +2273,34 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { }; /* - * Attribute CurrentScene + * Attribute GlobalSceneControl */ -class ReadScenesCurrentScene : public ReadAttribute { +class ReadOnOffGlobalSceneControl : public ReadAttribute { public: - ReadScenesCurrentScene() - : ReadAttribute("current-scene") + ReadOnOffGlobalSceneControl() + : ReadAttribute("global-scene-control") { } - ~ReadScenesCurrentScene() + ~ReadOnOffGlobalSceneControl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.CurrentScene response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes CurrentScene read Error", error); + LogNSError("OnOff GlobalSceneControl read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -2652,25 +2309,25 @@ class ReadScenesCurrentScene : public ReadAttribute { } }; -class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { +class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { public: - SubscribeAttributeScenesCurrentScene() - : SubscribeAttribute("current-scene") + SubscribeAttributeOnOffGlobalSceneControl() + : SubscribeAttribute("global-scene-control") { } - ~SubscribeAttributeScenesCurrentScene() + ~SubscribeAttributeOnOffGlobalSceneControl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -2681,10 +2338,10 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentSceneWithParams:params + [cluster subscribeAttributeGlobalSceneControlWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.CurrentScene response %@", [value description]); + NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -2698,34 +2355,34 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { }; /* - * Attribute CurrentGroup + * Attribute OnTime */ -class ReadScenesCurrentGroup : public ReadAttribute { +class ReadOnOffOnTime : public ReadAttribute { public: - ReadScenesCurrentGroup() - : ReadAttribute("current-group") + ReadOnOffOnTime() + : ReadAttribute("on-time") { } - ~ReadScenesCurrentGroup() + ~ReadOnOffOnTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentGroup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.CurrentGroup response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.OnTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes CurrentGroup read Error", error); + LogNSError("OnOff OnTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -2734,107 +2391,66 @@ class ReadScenesCurrentGroup : public ReadAttribute { } }; -class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { +class WriteOnOffOnTime : public WriteAttribute { public: - SubscribeAttributeScenesCurrentGroup() - : SubscribeAttribute("current-group") + WriteOnOffOnTime() + : WriteAttribute("on-time") { + AddArgument("attr-name", "on-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeScenesCurrentGroup() + ~WriteOnOffOnTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::CurrentGroup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentGroupWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.CurrentGroup response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SceneValid - */ -class ReadScenesSceneValid : public ReadAttribute { -public: - ReadScenesSceneValid() - : ReadAttribute("scene-valid") - { - } - - ~ReadScenesSceneValid() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneValid::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneValid response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Scenes SceneValid read Error", error); + [cluster writeAttributeOnTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OnTime write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint16_t mValue; }; -class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { +class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { public: - SubscribeAttributeScenesSceneValid() - : SubscribeAttribute("scene-valid") + SubscribeAttributeOnOffOnTime() + : SubscribeAttribute("on-time") { } - ~SubscribeAttributeScenesSceneValid() + ~SubscribeAttributeOnOffOnTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneValid::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -2845,10 +2461,10 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSceneValidWithParams:params + [cluster subscribeAttributeOnTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneValid response %@", [value description]); + NSLog(@"OnOff.OnTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -2862,34 +2478,34 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { }; /* - * Attribute NameSupport + * Attribute OffWaitTime */ -class ReadScenesNameSupport : public ReadAttribute { +class ReadOnOffOffWaitTime : public ReadAttribute { public: - ReadScenesNameSupport() - : ReadAttribute("name-support") + ReadOnOffOffWaitTime() + : ReadAttribute("off-wait-time") { } - ~ReadScenesNameSupport() + ~ReadOnOffOffWaitTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::NameSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.NameSupport response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.OffWaitTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes NameSupport read Error", error); + LogNSError("OnOff OffWaitTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -2898,107 +2514,66 @@ class ReadScenesNameSupport : public ReadAttribute { } }; -class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { +class WriteOnOffOffWaitTime : public WriteAttribute { public: - SubscribeAttributeScenesNameSupport() - : SubscribeAttribute("name-support") + WriteOnOffOffWaitTime() + : WriteAttribute("off-wait-time") { + AddArgument("attr-name", "off-wait-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeScenesNameSupport() + ~WriteOnOffOffWaitTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::NameSupport::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNameSupportWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.NameSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LastConfiguredBy - */ -class ReadScenesLastConfiguredBy : public ReadAttribute { -public: - ReadScenesLastConfiguredBy() - : ReadAttribute("last-configured-by") - { - } - - ~ReadScenesLastConfiguredBy() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::LastConfiguredBy::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Scenes LastConfiguredBy read Error", error); + [cluster writeAttributeOffWaitTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff OffWaitTime write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint16_t mValue; }; -class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { +class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { public: - SubscribeAttributeScenesLastConfiguredBy() - : SubscribeAttribute("last-configured-by") + SubscribeAttributeOnOffOffWaitTime() + : SubscribeAttribute("off-wait-time") { } - ~SubscribeAttributeScenesLastConfiguredBy() + ~SubscribeAttributeOnOffOffWaitTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::LastConfiguredBy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3009,10 +2584,10 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastConfiguredByWithParams:params + [cluster subscribeAttributeOffWaitTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); + NSLog(@"OnOff.OffWaitTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3025,37 +2600,35 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SceneTableSize + * Attribute StartUpOnOff */ -class ReadScenesSceneTableSize : public ReadAttribute { +class ReadOnOffStartUpOnOff : public ReadAttribute { public: - ReadScenesSceneTableSize() - : ReadAttribute("scene-table-size") + ReadOnOffStartUpOnOff() + : ReadAttribute("start-up-on-off") { } - ~ReadScenesSceneTableSize() + ~ReadOnOffStartUpOnOff() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::SceneTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneTableSize response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.StartUpOnOff response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes SceneTableSize read Error", error); + LogNSError("OnOff StartUpOnOff read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3064,114 +2637,69 @@ class ReadScenesSceneTableSize : public ReadAttribute { } }; -class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { +class WriteOnOffStartUpOnOff : public WriteAttribute { public: - SubscribeAttributeScenesSceneTableSize() - : SubscribeAttribute("scene-table-size") + WriteOnOffStartUpOnOff() + : WriteAttribute("start-up-on-off") { + AddArgument("attr-name", "start-up-on-off"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeScenesSceneTableSize() + ~WriteOnOffStartUpOnOff() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::SceneTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeSceneTableSizeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.SceneTableSize response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute FabricSceneInfo - */ -class ReadScenesFabricSceneInfo : public ReadAttribute { -public: - ReadScenesFabricSceneInfo() - : ReadAttribute("fabric-scene-info") - { - } - - ~ReadScenesFabricSceneInfo() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Scenes FabricSceneInfo read Error", error); + [cluster writeAttributeStartUpOnOffWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OnOff StartUpOnOff write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeScenesFabricSceneInfo : public SubscribeAttribute { +class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { public: - SubscribeAttributeScenesFabricSceneInfo() - : SubscribeAttribute("fabric-scene-info") + SubscribeAttributeOnOffStartUpOnOff() + : SubscribeAttribute("start-up-on-off") { } - ~SubscribeAttributeScenesFabricSceneInfo() + ~SubscribeAttributeOnOffStartUpOnOff() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3182,10 +2710,10 @@ class SubscribeAttributeScenesFabricSceneInfo : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFabricSceneInfoWithParams:params + [cluster subscribeAttributeStartUpOnOffWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.StartUpOnOff response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3198,37 +2726,35 @@ class SubscribeAttributeScenesFabricSceneInfo : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadScenesGeneratedCommandList : public ReadAttribute { +class ReadOnOffGeneratedCommandList : public ReadAttribute { public: - ReadScenesGeneratedCommandList() + ReadOnOffGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadScenesGeneratedCommandList() + ~ReadOnOffGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); + NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes GeneratedCommandList read Error", error); + LogNSError("OnOff GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3237,25 +2763,25 @@ class ReadScenesGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeScenesGeneratedCommandList() + SubscribeAttributeOnOffGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeScenesGeneratedCommandList() + ~SubscribeAttributeOnOffGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3269,7 +2795,7 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); + NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3285,32 +2811,32 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { /* * Attribute AcceptedCommandList */ -class ReadScenesAcceptedCommandList : public ReadAttribute { +class ReadOnOffAcceptedCommandList : public ReadAttribute { public: - ReadScenesAcceptedCommandList() + ReadOnOffAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadScenesAcceptedCommandList() + ~ReadOnOffAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); + NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes AcceptedCommandList read Error", error); + LogNSError("OnOff AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3319,25 +2845,25 @@ class ReadScenesAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeScenesAcceptedCommandList() + SubscribeAttributeOnOffAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeScenesAcceptedCommandList() + ~SubscribeAttributeOnOffAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3351,7 +2877,7 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); + NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3369,32 +2895,32 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadScenesEventList : public ReadAttribute { +class ReadOnOffEventList : public ReadAttribute { public: - ReadScenesEventList() + ReadOnOffEventList() : ReadAttribute("event-list") { } - ~ReadScenesEventList() + ~ReadOnOffEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.EventList response %@", [value description]); + NSLog(@"OnOff.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes EventList read Error", error); + LogNSError("OnOff EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3403,25 +2929,25 @@ class ReadScenesEventList : public ReadAttribute { } }; -class SubscribeAttributeScenesEventList : public SubscribeAttribute { +class SubscribeAttributeOnOffEventList : public SubscribeAttribute { public: - SubscribeAttributeScenesEventList() + SubscribeAttributeOnOffEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeScenesEventList() + ~SubscribeAttributeOnOffEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3435,7 +2961,7 @@ class SubscribeAttributeScenesEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.EventList response %@", [value description]); + NSLog(@"OnOff.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3453,32 +2979,32 @@ class SubscribeAttributeScenesEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadScenesAttributeList : public ReadAttribute { +class ReadOnOffAttributeList : public ReadAttribute { public: - ReadScenesAttributeList() + ReadOnOffAttributeList() : ReadAttribute("attribute-list") { } - ~ReadScenesAttributeList() + ~ReadOnOffAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.AttributeList response %@", [value description]); + NSLog(@"OnOff.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes AttributeList read Error", error); + LogNSError("OnOff AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3487,25 +3013,25 @@ class ReadScenesAttributeList : public ReadAttribute { } }; -class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { +class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { public: - SubscribeAttributeScenesAttributeList() + SubscribeAttributeOnOffAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeScenesAttributeList() + ~SubscribeAttributeOnOffAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3519,7 +3045,7 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.AttributeList response %@", [value description]); + NSLog(@"OnOff.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3535,32 +3061,32 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadScenesFeatureMap : public ReadAttribute { +class ReadOnOffFeatureMap : public ReadAttribute { public: - ReadScenesFeatureMap() + ReadOnOffFeatureMap() : ReadAttribute("feature-map") { } - ~ReadScenesFeatureMap() + ~ReadOnOffFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.FeatureMap response %@", [value description]); + NSLog(@"OnOff.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes FeatureMap read Error", error); + LogNSError("OnOff FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3569,25 +3095,25 @@ class ReadScenesFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeScenesFeatureMap() + SubscribeAttributeOnOffFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeScenesFeatureMap() + ~SubscribeAttributeOnOffFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3601,7 +3127,7 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.FeatureMap response %@", [value description]); + NSLog(@"OnOff.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3617,32 +3143,32 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadScenesClusterRevision : public ReadAttribute { +class ReadOnOffClusterRevision : public ReadAttribute { public: - ReadScenesClusterRevision() + ReadOnOffClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadScenesClusterRevision() + ~ReadOnOffClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.ClusterRevision response %@", [value description]); + NSLog(@"OnOff.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes ClusterRevision read Error", error); + LogNSError("OnOff ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3651,25 +3177,25 @@ class ReadScenesClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeScenesClusterRevision() + SubscribeAttributeOnOffClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeScenesClusterRevision() + ~SubscribeAttributeOnOffClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -3683,7 +3209,7 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.ClusterRevision response %@", [value description]); + NSLog(@"OnOff.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -3697,22 +3223,13 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster OnOff | 0x0006 | +| Cluster OnOffSwitchConfiguration | 0x0007 | |------------------------------------------------------------------------------| | Commands: | | -| * Off | 0x00 | -| * On | 0x01 | -| * Toggle | 0x02 | -| * OffWithEffect | 0x40 | -| * OnWithRecallGlobalScene | 0x41 | -| * OnWithTimedOff | 0x42 | |------------------------------------------------------------------------------| | Attributes: | | -| * OnOff | 0x0000 | -| * GlobalSceneControl | 0x4000 | -| * OnTime | 0x4001 | -| * OffWaitTime | 0x4002 | -| * StartUpOnOff | 0x4003 | +| * SwitchType | 0x0000 | +| * SwitchActions | 0x0010 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3724,1364 +3241,38 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command Off + * Attribute SwitchType */ -class OnOffOff : public ClusterCommand { +class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { public: - OnOffOff() - : ClusterCommand("off") + ReadOnOffSwitchConfigurationSwitchType() + : ReadAttribute("switch-type") + { + } + + ~ReadOnOffSwitchConfigurationSwitchType() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Off::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterOffParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster offWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command On - */ -class OnOffOn : public ClusterCommand { -public: - OnOffOn() - : ClusterCommand("on") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::On::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterOnParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster onWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Toggle - */ -class OnOffToggle : public ClusterCommand { -public: - OnOffToggle() - : ClusterCommand("toggle") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterToggleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster toggleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command OffWithEffect - */ -class OnOffOffWithEffect : public ClusterCommand { -public: - OnOffOffWithEffect() - : ClusterCommand("off-with-effect") - { - AddArgument("EffectIdentifier", 0, UINT8_MAX, &mRequest.effectIdentifier); - AddArgument("EffectVariant", 0, UINT8_MAX, &mRequest.effectVariant); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OffWithEffect::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterOffWithEffectParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.effectIdentifier)]; - params.effectVariant = [NSNumber numberWithUnsignedChar:mRequest.effectVariant]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster offWithEffectWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type mRequest; -}; - -/* - * Command OnWithRecallGlobalScene - */ -class OnOffOnWithRecallGlobalScene : public ClusterCommand { -public: - OnOffOnWithRecallGlobalScene() - : ClusterCommand("on-with-recall-global-scene") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster onWithRecallGlobalSceneWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command OnWithTimedOff - */ -class OnOffOnWithTimedOff : public ClusterCommand { -public: - OnOffOnWithTimedOff() - : ClusterCommand("on-with-timed-off") - { - AddArgument("OnOffControl", 0, UINT8_MAX, &mRequest.onOffControl); - AddArgument("OnTime", 0, UINT16_MAX, &mRequest.onTime); - AddArgument("OffWaitTime", 0, UINT16_MAX, &mRequest.offWaitTime); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.onOffControl = [NSNumber numberWithUnsignedChar:mRequest.onOffControl.Raw()]; - params.onTime = [NSNumber numberWithUnsignedShort:mRequest.onTime]; - params.offWaitTime = [NSNumber numberWithUnsignedShort:mRequest.offWaitTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster onWithTimedOffWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; -}; - -/* - * Attribute OnOff - */ -class ReadOnOffOnOff : public ReadAttribute { -public: - ReadOnOffOnOff() - : ReadAttribute("on-off") - { - } - - ~ReadOnOffOnOff() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OnOff response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff OnOff read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { -public: - SubscribeAttributeOnOffOnOff() - : SubscribeAttribute("on-off") - { - } - - ~SubscribeAttributeOnOffOnOff() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnOffWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OnOff response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GlobalSceneControl - */ -class ReadOnOffGlobalSceneControl : public ReadAttribute { -public: - ReadOnOffGlobalSceneControl() - : ReadAttribute("global-scene-control") - { - } - - ~ReadOnOffGlobalSceneControl() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff GlobalSceneControl read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { -public: - SubscribeAttributeOnOffGlobalSceneControl() - : SubscribeAttribute("global-scene-control") - { - } - - ~SubscribeAttributeOnOffGlobalSceneControl() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GlobalSceneControl::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGlobalSceneControlWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OnTime - */ -class ReadOnOffOnTime : public ReadAttribute { -public: - ReadOnOffOnTime() - : ReadAttribute("on-time") - { - } - - ~ReadOnOffOnTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OnTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff OnTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOnOffOnTime : public WriteAttribute { -public: - WriteOnOffOnTime() - : WriteAttribute("on-time") - { - AddArgument("attr-name", "on-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffOnTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeOnTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OnTime write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { -public: - SubscribeAttributeOnOffOnTime() - : SubscribeAttribute("on-time") - { - } - - ~SubscribeAttributeOnOffOnTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OnTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOnTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OnTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OffWaitTime - */ -class ReadOnOffOffWaitTime : public ReadAttribute { -public: - ReadOnOffOffWaitTime() - : ReadAttribute("off-wait-time") - { - } - - ~ReadOnOffOffWaitTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OffWaitTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff OffWaitTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOnOffOffWaitTime : public WriteAttribute { -public: - WriteOnOffOffWaitTime() - : WriteAttribute("off-wait-time") - { - AddArgument("attr-name", "off-wait-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffOffWaitTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeOffWaitTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff OffWaitTime write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { -public: - SubscribeAttributeOnOffOffWaitTime() - : SubscribeAttribute("off-wait-time") - { - } - - ~SubscribeAttributeOnOffOffWaitTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::OffWaitTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOffWaitTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OffWaitTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute StartUpOnOff - */ -class ReadOnOffStartUpOnOff : public ReadAttribute { -public: - ReadOnOffStartUpOnOff() - : ReadAttribute("start-up-on-off") - { - } - - ~ReadOnOffStartUpOnOff() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff StartUpOnOff read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOnOffStartUpOnOff : public WriteAttribute { -public: - WriteOnOffStartUpOnOff() - : WriteAttribute("start-up-on-off") - { - AddArgument("attr-name", "start-up-on-off"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffStartUpOnOff() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpOnOffWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOff StartUpOnOff write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { -public: - SubscribeAttributeOnOffStartUpOnOff() - : SubscribeAttribute("start-up-on-off") - { - } - - ~SubscribeAttributeOnOffStartUpOnOff() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::StartUpOnOff::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpOnOffWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadOnOffGeneratedCommandList : public ReadAttribute { -public: - ReadOnOffGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOnOffGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeOnOffGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadOnOffAcceptedCommandList : public ReadAttribute { -public: - ReadOnOffAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadOnOffAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeOnOffAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadOnOffEventList : public ReadAttribute { -public: - ReadOnOffEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOnOffEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffEventList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOnOffEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadOnOffAttributeList : public ReadAttribute { -public: - ReadOnOffAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadOnOffAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeOnOffAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadOnOffFeatureMap : public ReadAttribute { -public: - ReadOnOffFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadOnOffFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeOnOffFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeOnOffFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadOnOffClusterRevision : public ReadAttribute { -public: - ReadOnOffClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadOnOffClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOff ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeOnOffClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeOnOffClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOff::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOff::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute SwitchType - */ -class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationSwitchType() - : ReadAttribute("switch-type") - { - } - - ~ReadOnOffSwitchConfigurationSwitchType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -43151,12 +41342,922 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfPositionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.NumberOfPositions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute CurrentPosition + */ +class ReadSwitchCurrentPosition : public ReadAttribute { +public: + ReadSwitchCurrentPosition() + : ReadAttribute("current-position") + { + } + + ~ReadSwitchCurrentPosition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch CurrentPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { +public: + SubscribeAttributeSwitchCurrentPosition() + : SubscribeAttribute("current-position") + { + } + + ~SubscribeAttributeSwitchCurrentPosition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCurrentPositionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MultiPressMax + */ +class ReadSwitchMultiPressMax : public ReadAttribute { +public: + ReadSwitchMultiPressMax() + : ReadAttribute("multi-press-max") + { + } + + ~ReadSwitchMultiPressMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch MultiPressMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { +public: + SubscribeAttributeSwitchMultiPressMax() + : SubscribeAttribute("multi-press-max") + { + } + + ~SubscribeAttributeSwitchMultiPressMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMultiPressMaxWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadSwitchGeneratedCommandList : public ReadAttribute { +public: + ReadSwitchGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadSwitchGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeSwitchGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeSwitchGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadSwitchAcceptedCommandList : public ReadAttribute { +public: + ReadSwitchAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadSwitchAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeSwitchAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeSwitchAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute EventList + */ +class ReadSwitchEventList : public ReadAttribute { +public: + ReadSwitchEventList() + : ReadAttribute("event-list") + { + } + + ~ReadSwitchEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchEventList : public SubscribeAttribute { +public: + SubscribeAttributeSwitchEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeSwitchEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute AttributeList + */ +class ReadSwitchAttributeList : public ReadAttribute { +public: + ReadSwitchAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadSwitchAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeSwitchAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeSwitchAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadSwitchFeatureMap : public ReadAttribute { +public: + ReadSwitchFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadSwitchFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeSwitchFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeSwitchFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadSwitchClusterRevision : public ReadAttribute { +public: + ReadSwitchClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadSwitchClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Switch ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeSwitchClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeSwitchClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster AdministratorCommissioning | 0x003C | +|------------------------------------------------------------------------------| +| Commands: | | +| * OpenCommissioningWindow | 0x00 | +| * OpenBasicCommissioningWindow | 0x01 | +| * RevokeCommissioning | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowStatus | 0x0000 | +| * AdminFabricIndex | 0x0001 | +| * AdminVendorId | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command OpenCommissioningWindow + */ +class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { +public: + AdministratorCommissioningOpenCommissioningWindow() + : ClusterCommand("open-commissioning-window") + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); + AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); + AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); + AddArgument("Salt", &mRequest.salt); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() length:mRequest.PAKEPasscodeVerifier.size()]; + params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; + params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; + params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; +}; + +/* + * Command OpenBasicCommissioningWindow + */ +class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { +public: + AdministratorCommissioningOpenBasicCommissioningWindow() + : ClusterCommand("open-basic-commissioning-window") + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openBasicCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; +}; + +/* + * Command RevokeCommissioning + */ +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { +public: + AdministratorCommissioningRevokeCommissioning() + : ClusterCommand("revoke-commissioning") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster revokeCommissioningWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute WindowStatus + */ +class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +public: + ReadAdministratorCommissioningWindowStatus() + : ReadAttribute("window-status") + { + } + + ~ReadAdministratorCommissioningWindowStatus() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AdministratorCommissioning WindowStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { +public: + SubscribeAttributeAdministratorCommissioningWindowStatus() + : SubscribeAttribute("window-status") + { + } + + ~SubscribeAttributeAdministratorCommissioningWindowStatus() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43167,10 +42268,10 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPositionsWithParams:params + [cluster subscribeAttributeWindowStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43184,34 +42285,34 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { }; /* - * Attribute CurrentPosition + * Attribute AdminFabricIndex */ -class ReadSwitchCurrentPosition : public ReadAttribute { +class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { public: - ReadSwitchCurrentPosition() - : ReadAttribute("current-position") + ReadAdministratorCommissioningAdminFabricIndex() + : ReadAttribute("admin-fabric-index") { } - ~ReadSwitchCurrentPosition() + ~ReadAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch CurrentPosition read Error", error); + LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43220,25 +42321,25 @@ class ReadSwitchCurrentPosition : public ReadAttribute { } }; -class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeSwitchCurrentPosition() - : SubscribeAttribute("current-position") + SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + : SubscribeAttribute("admin-fabric-index") { } - ~SubscribeAttributeSwitchCurrentPosition() + ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43249,10 +42350,10 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionWithParams:params + [cluster subscribeAttributeAdminFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43266,34 +42367,34 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { }; /* - * Attribute MultiPressMax + * Attribute AdminVendorId */ -class ReadSwitchMultiPressMax : public ReadAttribute { +class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { public: - ReadSwitchMultiPressMax() - : ReadAttribute("multi-press-max") + ReadAdministratorCommissioningAdminVendorId() + : ReadAttribute("admin-vendor-id") { } - ~ReadSwitchMultiPressMax() + ~ReadAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch MultiPressMax read Error", error); + LogNSError("AdministratorCommissioning AdminVendorId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43302,25 +42403,25 @@ class ReadSwitchMultiPressMax : public ReadAttribute { } }; -class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { public: - SubscribeAttributeSwitchMultiPressMax() - : SubscribeAttribute("multi-press-max") + SubscribeAttributeAdministratorCommissioningAdminVendorId() + : SubscribeAttribute("admin-vendor-id") { } - ~SubscribeAttributeSwitchMultiPressMax() + ~SubscribeAttributeAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43331,10 +42432,10 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMultiPressMaxWithParams:params + [cluster subscribeAttributeAdminVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43350,32 +42451,32 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadSwitchGeneratedCommandList : public ReadAttribute { +class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadSwitchGeneratedCommandList() + ReadAdministratorCommissioningGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadSwitchGeneratedCommandList() + ~ReadAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch GeneratedCommandList read Error", error); + LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43384,25 +42485,25 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSwitchGeneratedCommandList() + SubscribeAttributeAdministratorCommissioningGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSwitchGeneratedCommandList() + ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43416,7 +42517,7 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43432,32 +42533,32 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { /* * Attribute AcceptedCommandList */ -class ReadSwitchAcceptedCommandList : public ReadAttribute { +class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadSwitchAcceptedCommandList() + ReadAdministratorCommissioningAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadSwitchAcceptedCommandList() + ~ReadAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch AcceptedCommandList read Error", error); + LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43466,25 +42567,25 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSwitchAcceptedCommandList() + SubscribeAttributeAdministratorCommissioningAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSwitchAcceptedCommandList() + ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43498,7 +42599,7 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43516,32 +42617,32 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadSwitchEventList : public ReadAttribute { +class ReadAdministratorCommissioningEventList : public ReadAttribute { public: - ReadSwitchEventList() + ReadAdministratorCommissioningEventList() : ReadAttribute("event-list") { } - ~ReadSwitchEventList() + ~ReadAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch EventList read Error", error); + LogNSError("AdministratorCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43550,25 +42651,25 @@ class ReadSwitchEventList : public ReadAttribute { } }; -class SubscribeAttributeSwitchEventList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributeSwitchEventList() + SubscribeAttributeAdministratorCommissioningEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSwitchEventList() + ~SubscribeAttributeAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43582,7 +42683,7 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43600,32 +42701,32 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadSwitchAttributeList : public ReadAttribute { +class ReadAdministratorCommissioningAttributeList : public ReadAttribute { public: - ReadSwitchAttributeList() + ReadAdministratorCommissioningAttributeList() : ReadAttribute("attribute-list") { } - ~ReadSwitchAttributeList() + ~ReadAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch AttributeList read Error", error); + LogNSError("AdministratorCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43634,25 +42735,25 @@ class ReadSwitchAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSwitchAttributeList() + SubscribeAttributeAdministratorCommissioningAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSwitchAttributeList() + ~SubscribeAttributeAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43666,7 +42767,7 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43682,32 +42783,32 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadSwitchFeatureMap : public ReadAttribute { +class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { public: - ReadSwitchFeatureMap() + ReadAdministratorCommissioningFeatureMap() : ReadAttribute("feature-map") { } - ~ReadSwitchFeatureMap() + ~ReadAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch FeatureMap read Error", error); + LogNSError("AdministratorCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43716,25 +42817,25 @@ class ReadSwitchFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSwitchFeatureMap() + SubscribeAttributeAdministratorCommissioningFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSwitchFeatureMap() + ~SubscribeAttributeAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43748,7 +42849,7 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43764,32 +42865,32 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadSwitchClusterRevision : public ReadAttribute { +class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { public: - ReadSwitchClusterRevision() + ReadAdministratorCommissioningClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadSwitchClusterRevision() + ~ReadAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch ClusterRevision read Error", error); + LogNSError("AdministratorCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43798,25 +42899,25 @@ class ReadSwitchClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSwitchClusterRevision() + SubscribeAttributeAdministratorCommissioningClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSwitchClusterRevision() + ~SubscribeAttributeAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43830,7 +42931,7 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43844,17 +42945,25 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster AdministratorCommissioning | 0x003C | +| Cluster OperationalCredentials | 0x003E | |------------------------------------------------------------------------------| | Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -43866,47 +42975,98 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command OpenCommissioningWindow + * Command AttestationRequest */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - AdministratorCommissioningOpenCommissioningWindow() - : ClusterCommand("open-commissioning-window") + OperationalCredentialsAttestationRequest() + : ClusterCommand("attestation-request") { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); - AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); - AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); - AddArgument("Salt", &mRequest.salt); + AddArgument("AttestationNonce", &mRequest.attestationNonce); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; - params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() length:mRequest.PAKEPasscodeVerifier.size()]; - params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; - params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; - params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; + params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster openCommissioningWindowWithParams:params completion: - ^(NSError * _Nullable error) { + [cluster attestationRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; +}; + +/* + * Command CertificateChainRequest + */ +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { +public: + OperationalCredentialsCertificateChainRequest() + : ClusterCommand("certificate-chain-request") + { + AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster certificateChainRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -43917,129 +43077,378 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; /* - * Command OpenBasicCommissioningWindow + * Command CSRRequest */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - AdministratorCommissioningOpenBasicCommissioningWindow() - : ClusterCommand("open-basic-commissioning-window") + OperationalCredentialsCSRRequest() + : ClusterCommand("csrrequest") { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("CSRNonce", &mRequest.CSRNonce); + AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; + if (mRequest.isForUpdateNOC.HasValue()) { + params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; + } else { + params.isForUpdateNOC = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster openBasicCommissioningWindowWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster CSRRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; /* - * Command RevokeCommissioning + * Command AddNOC */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { +class OperationalCredentialsAddNOC : public ClusterCommand { public: - AdministratorCommissioningRevokeCommissioning() - : ClusterCommand("revoke-commissioning") + OperationalCredentialsAddNOC() + : ClusterCommand("add-noc") { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + AddArgument("IPKValue", &mRequest.IPKValue); + AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); + AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; + } + params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; + params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; + params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster revokeCommissioningWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; /* - * Attribute WindowStatus + * Command UpdateNOC */ -class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - ReadAdministratorCommissioningWindowStatus() - : ReadAttribute("window-status") + OperationalCredentialsUpdateNOC() + : ClusterCommand("update-noc") { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + ClusterCommand::AddArguments(); } - ~ReadAdministratorCommissioningWindowStatus() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; +}; + +/* + * Command UpdateFabricLabel + */ +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { +public: + OperationalCredentialsUpdateFabricLabel() + : ClusterCommand("update-fabric-label") { + AddArgument("Label", &mRequest.label); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.label = [[NSString alloc] initWithBytes:mRequest.label.data() length:mRequest.label.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateFabricLabelWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; +}; + +/* + * Command RemoveFabric + */ +class OperationalCredentialsRemoveFabric : public ClusterCommand { +public: + OperationalCredentialsRemoveFabric() + : ClusterCommand("remove-fabric") + { + AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeFabricWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; +}; + +/* + * Command AddTrustedRootCertificate + */ +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +public: + OperationalCredentialsAddTrustedRootCertificate() + : ClusterCommand("add-trusted-root-certificate") + { + AddArgument("RootCACertificate", &mRequest.rootCACertificate); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() length:mRequest.rootCACertificate.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addTrustedRootCertificateWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; +}; + +/* + * Attribute NOCs + */ +class ReadOperationalCredentialsNOCs : public ReadAttribute { +public: + ReadOperationalCredentialsNOCs() + : ReadAttribute("nocs") + { + } + + ~ReadOperationalCredentialsNOCs() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeNOCsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning WindowStatus read Error", error); + LogNSError("OperationalCredentials NOCs read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44048,25 +43457,25 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningWindowStatus() - : SubscribeAttribute("window-status") + SubscribeAttributeOperationalCredentialsNOCs() + : SubscribeAttribute("nocs") { } - ~SubscribeAttributeAdministratorCommissioningWindowStatus() + ~SubscribeAttributeOperationalCredentialsNOCs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44077,10 +43486,178 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindowStatusWithParams:params + [cluster subscribeAttributeNOCsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute Fabrics + */ +class ReadOperationalCredentialsFabrics : public ReadAttribute { +public: + ReadOperationalCredentialsFabrics() + : ReadAttribute("fabrics") + { + } + + ~ReadOperationalCredentialsFabrics() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalCredentials Fabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { +public: + SubscribeAttributeOperationalCredentialsFabrics() + : SubscribeAttribute("fabrics") + { + } + + ~SubscribeAttributeOperationalCredentialsFabrics() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFabricsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SupportedFabrics + */ +class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { +public: + ReadOperationalCredentialsSupportedFabrics() + : ReadAttribute("supported-fabrics") + { + } + + ~ReadOperationalCredentialsSupportedFabrics() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalCredentials SupportedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { +public: + SubscribeAttributeOperationalCredentialsSupportedFabrics() + : SubscribeAttribute("supported-fabrics") + { + } + + ~SubscribeAttributeOperationalCredentialsSupportedFabrics() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSupportedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44094,34 +43671,116 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib }; /* - * Attribute AdminFabricIndex + * Attribute CommissionedFabrics */ -class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { +class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { public: - ReadAdministratorCommissioningAdminFabricIndex() - : ReadAttribute("admin-fabric-index") + ReadOperationalCredentialsCommissionedFabrics() + : ReadAttribute("commissioned-fabrics") { } - ~ReadAdministratorCommissioningAdminFabricIndex() + ~ReadOperationalCredentialsCommissionedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { +public: + SubscribeAttributeOperationalCredentialsCommissionedFabrics() + : SubscribeAttribute("commissioned-fabrics") + { + } + + ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCommissionedFabricsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute TrustedRootCertificates + */ +class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { +public: + ReadOperationalCredentialsTrustedRootCertificates() + : ReadAttribute("trusted-root-certificates") + { + } + + ~ReadOperationalCredentialsTrustedRootCertificates() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); + LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44130,25 +43789,25 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminFabricIndex() - : SubscribeAttribute("admin-fabric-index") + SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + : SubscribeAttribute("trusted-root-certificates") { } - ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44159,10 +43818,10 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminFabricIndexWithParams:params + [cluster subscribeAttributeTrustedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44176,34 +43835,34 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs }; /* - * Attribute AdminVendorId + * Attribute CurrentFabricIndex */ -class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { +class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { public: - ReadAdministratorCommissioningAdminVendorId() - : ReadAttribute("admin-vendor-id") + ReadOperationalCredentialsCurrentFabricIndex() + : ReadAttribute("current-fabric-index") { } - ~ReadAdministratorCommissioningAdminVendorId() + ~ReadOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AdminVendorId read Error", error); + LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44212,25 +43871,25 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminVendorId() - : SubscribeAttribute("admin-vendor-id") + SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + : SubscribeAttribute("current-fabric-index") { } - ~SubscribeAttributeAdministratorCommissioningAdminVendorId() + ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44241,10 +43900,10 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminVendorIdWithParams:params + [cluster subscribeAttributeCurrentFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44260,32 +43919,32 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri /* * Attribute GeneratedCommandList */ -class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { +class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningGeneratedCommandList() + ReadOperationalCredentialsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAdministratorCommissioningGeneratedCommandList() + ~ReadOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + LogNSError("OperationalCredentials GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44294,25 +43953,25 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + SubscribeAttributeOperationalCredentialsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44326,7 +43985,7 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44342,32 +44001,32 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { +class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningAcceptedCommandList() + ReadOperationalCredentialsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAdministratorCommissioningAcceptedCommandList() + ~ReadOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44376,25 +44035,25 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + SubscribeAttributeOperationalCredentialsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44408,7 +44067,7 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44426,32 +44085,32 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S /* * Attribute EventList */ -class ReadAdministratorCommissioningEventList : public ReadAttribute { +class ReadOperationalCredentialsEventList : public ReadAttribute { public: - ReadAdministratorCommissioningEventList() + ReadOperationalCredentialsEventList() : ReadAttribute("event-list") { } - ~ReadAdministratorCommissioningEventList() + ~ReadOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning EventList read Error", error); + LogNSError("OperationalCredentials EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44460,25 +44119,25 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningEventList() + SubscribeAttributeOperationalCredentialsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAdministratorCommissioningEventList() + ~SubscribeAttributeOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44492,7 +44151,7 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44510,32 +44169,32 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadAdministratorCommissioningAttributeList : public ReadAttribute { +class ReadOperationalCredentialsAttributeList : public ReadAttribute { public: - ReadAdministratorCommissioningAttributeList() + ReadOperationalCredentialsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAdministratorCommissioningAttributeList() + ~ReadOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AttributeList read Error", error); + LogNSError("OperationalCredentials AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44544,25 +44203,25 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAttributeList() + SubscribeAttributeOperationalCredentialsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAdministratorCommissioningAttributeList() + ~SubscribeAttributeOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44576,7 +44235,7 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44592,32 +44251,32 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { +class ReadOperationalCredentialsFeatureMap : public ReadAttribute { public: - ReadAdministratorCommissioningFeatureMap() + ReadOperationalCredentialsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAdministratorCommissioningFeatureMap() + ~ReadOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning FeatureMap read Error", error); + LogNSError("OperationalCredentials FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44626,25 +44285,25 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningFeatureMap() + SubscribeAttributeOperationalCredentialsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAdministratorCommissioningFeatureMap() + ~SubscribeAttributeOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44658,7 +44317,7 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44674,32 +44333,32 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { +class ReadOperationalCredentialsClusterRevision : public ReadAttribute { public: - ReadAdministratorCommissioningClusterRevision() + ReadOperationalCredentialsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAdministratorCommissioningClusterRevision() + ~ReadOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + LogNSError("OperationalCredentials ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44708,25 +44367,25 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningClusterRevision() + SubscribeAttributeOperationalCredentialsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAdministratorCommissioningClusterRevision() + ~SubscribeAttributeOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44740,7 +44399,7 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44754,25 +44413,19 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster GroupKeyManagement | 0x003F | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -44784,480 +44437,738 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc \*----------------------------------------------------------------------------*/ /* - * Command AttestationRequest + * Command KeySetWrite */ -class OperationalCredentialsAttestationRequest : public ClusterCommand { +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - OperationalCredentialsAttestationRequest() - : ClusterCommand("attestation-request") + GroupKeyManagementKeySetWrite() + : ClusterCommand("key-set-write") + , mComplex_GroupKeySet(&mRequest.groupKeySet) { - AddArgument("AttestationNonce", &mRequest.attestationNonce); + AddArgument("GroupKeySet", &mComplex_GroupKeySet); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; + params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; + params.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; + if (mRequest.groupKeySet.epochKey0.IsNull()) { + params.groupKeySet.epochKey0 = nil; + } else { + params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() length:mRequest.groupKeySet.epochKey0.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime0.IsNull()) { + params.groupKeySet.epochStartTime0 = nil; + } else { + params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; + } + if (mRequest.groupKeySet.epochKey1.IsNull()) { + params.groupKeySet.epochKey1 = nil; + } else { + params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() length:mRequest.groupKeySet.epochKey1.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime1.IsNull()) { + params.groupKeySet.epochStartTime1 = nil; + } else { + params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; + } + if (mRequest.groupKeySet.epochKey2.IsNull()) { + params.groupKeySet.epochKey2 = nil; + } else { + params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() length:mRequest.groupKeySet.epochKey2.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime2.IsNull()) { + params.groupKeySet.epochStartTime2 = nil; + } else { + params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster attestationRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetWriteWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; /* - * Command CertificateChainRequest + * Command KeySetRead */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand { +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - OperationalCredentialsCertificateChainRequest() - : ClusterCommand("certificate-chain-request") + GroupKeyManagementKeySetRead() + : ClusterCommand("key-set-read") { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster certificateChainRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetReadWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command CSRRequest + * Command KeySetRemove */ -class OperationalCredentialsCSRRequest : public ClusterCommand { +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - OperationalCredentialsCSRRequest() - : ClusterCommand("csrrequest") + GroupKeyManagementKeySetRemove() + : ClusterCommand("key-set-remove") { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; - if (mRequest.isForUpdateNOC.HasValue()) { - params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; - } else { - params.isForUpdateNOC = nil; - } + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster CSRRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetRemoveWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; }; /* - * Command AddNOC + * Command KeySetReadAllIndices */ -class OperationalCredentialsAddNOC : public ClusterCommand { +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - OperationalCredentialsAddNOC() - : ClusterCommand("add-noc") + GroupKeyManagementKeySetReadAllIndices() + : ClusterCommand("key-set-read-all-indices") { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - AddArgument("IPKValue", &mRequest.IPKValue); - AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); - AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; - } - params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; - params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; - params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetReadAllIndicesWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; /* - * Command UpdateNOC + * Attribute GroupKeyMap */ -class OperationalCredentialsUpdateNOC : public ClusterCommand { +class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { public: - OperationalCredentialsUpdateNOC() - : ClusterCommand("update-noc") + ReadGroupKeyManagementGroupKeyMap() + : ReadAttribute("group-key-map") + { + } + + ~ReadGroupKeyManagementGroupKeyMap() { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updateNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { +public: + WriteGroupKeyManagementGroupKeyMap() + : WriteAttribute("group-key-map") + , mComplex(&mValue) + { + AddArgument("attr-name", "group-key-map"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); + } + + ~WriteGroupKeyManagementGroupKeyMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; } + + [cluster writeAttributeGroupKeyMapWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; +}; + +class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementGroupKeyMap() + : SubscribeAttribute("group-key-map") + { + } + + ~SubscribeAttributeGroupKeyManagementGroupKeyMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGroupKeyMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* - * Command UpdateFabricLabel + * Attribute GroupTable */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { +class ReadGroupKeyManagementGroupTable : public ReadAttribute { public: - OperationalCredentialsUpdateFabricLabel() - : ClusterCommand("update-fabric-label") + ReadGroupKeyManagementGroupTable() + : ReadAttribute("group-table") + { + } + + ~ReadGroupKeyManagementGroupTable() { - AddArgument("Label", &mRequest.label); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.label = [[NSString alloc] initWithBytes:mRequest.label.data() length:mRequest.label.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updateFabricLabelWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement GroupTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; +class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementGroupTable() + : SubscribeAttribute("group-table") + { + } + + ~SubscribeAttributeGroupKeyManagementGroupTable() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGroupTableWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* - * Command RemoveFabric + * Attribute MaxGroupsPerFabric */ -class OperationalCredentialsRemoveFabric : public ClusterCommand { +class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { public: - OperationalCredentialsRemoveFabric() - : ClusterCommand("remove-fabric") + ReadGroupKeyManagementMaxGroupsPerFabric() + : ReadAttribute("max-groups-per-fabric") + { + } + + ~ReadGroupKeyManagementMaxGroupsPerFabric() { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeFabricWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + : SubscribeAttribute("max-groups-per-fabric") + { + } + + ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MaxGroupKeysPerFabric + */ +class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { +public: + ReadGroupKeyManagementMaxGroupKeysPerFabric() + : ReadAttribute("max-group-keys-per-fabric") + { + } + + ~ReadGroupKeyManagementMaxGroupKeysPerFabric() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + : SubscribeAttribute("max-group-keys-per-fabric") + { + } + + ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { +public: + ReadGroupKeyManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadGroupKeyManagementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; -/* - * Command AddTrustedRootCertificate - */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { public: - OperationalCredentialsAddTrustedRootCertificate() - : ClusterCommand("add-trusted-root-certificate") + SubscribeAttributeGroupKeyManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - AddArgument("RootCACertificate", &mRequest.rootCACertificate); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() length:mRequest.rootCACertificate.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addTrustedRootCertificateWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; /* - * Attribute NOCs + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsNOCs : public ReadAttribute { +class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsNOCs() - : ReadAttribute("nocs") + ReadGroupKeyManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsNOCs() + ~ReadGroupKeyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeNOCsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials NOCs read Error", error); + LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45266,25 +45177,25 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsNOCs() - : SubscribeAttribute("nocs") + SubscribeAttributeGroupKeyManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsNOCs() + ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45295,10 +45206,10 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNOCsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45311,39 +45222,37 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Fabrics + * Attribute EventList */ -class ReadOperationalCredentialsFabrics : public ReadAttribute { +class ReadGroupKeyManagementEventList : public ReadAttribute { public: - ReadOperationalCredentialsFabrics() - : ReadAttribute("fabrics") + ReadGroupKeyManagementEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsFabrics() + ~ReadGroupKeyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials Fabrics read Error", error); + LogNSError("GroupKeyManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45352,25 +45261,25 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFabrics() - : SubscribeAttribute("fabrics") + SubscribeAttributeGroupKeyManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsFabrics() + ~SubscribeAttributeGroupKeyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45381,10 +45290,10 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFabricsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45397,35 +45306,37 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedFabrics + * Attribute AttributeList */ -class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { +class ReadGroupKeyManagementAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsSupportedFabrics() - : ReadAttribute("supported-fabrics") + ReadGroupKeyManagementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsSupportedFabrics() + ~ReadGroupKeyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials SupportedFabrics read Error", error); + LogNSError("GroupKeyManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45434,25 +45345,25 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsSupportedFabrics() - : SubscribeAttribute("supported-fabrics") + SubscribeAttributeGroupKeyManagementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsSupportedFabrics() + ~SubscribeAttributeGroupKeyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45463,10 +45374,10 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedFabricsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45480,34 +45391,34 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib }; /* - * Attribute CommissionedFabrics + * Attribute FeatureMap */ -class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { +class ReadGroupKeyManagementFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsCommissionedFabrics() - : ReadAttribute("commissioned-fabrics") + ReadGroupKeyManagementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsCommissionedFabrics() + ~ReadGroupKeyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + LogNSError("GroupKeyManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45516,25 +45427,25 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCommissionedFabrics() - : SubscribeAttribute("commissioned-fabrics") + SubscribeAttributeGroupKeyManagementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() + ~SubscribeAttributeGroupKeyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45545,10 +45456,10 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCommissionedFabricsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45562,34 +45473,34 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc }; /* - * Attribute TrustedRootCertificates + * Attribute ClusterRevision */ -class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { +class ReadGroupKeyManagementClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsTrustedRootCertificates() - : ReadAttribute("trusted-root-certificates") + ReadGroupKeyManagementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsTrustedRootCertificates() + ~ReadGroupKeyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); + LogNSError("GroupKeyManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45598,25 +45509,25 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsTrustedRootCertificates() - : SubscribeAttribute("trusted-root-certificates") + SubscribeAttributeGroupKeyManagementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + ~SubscribeAttributeGroupKeyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45627,10 +45538,10 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTrustedRootCertificatesWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45643,35 +45554,52 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } }; +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute CurrentFabricIndex + * Attribute LabelList */ -class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { +class ReadFixedLabelLabelList : public ReadAttribute { public: - ReadOperationalCredentialsCurrentFabricIndex() - : ReadAttribute("current-fabric-index") + ReadFixedLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadOperationalCredentialsCurrentFabricIndex() + ~ReadFixedLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); + LogNSError("FixedLabel LabelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45680,25 +45608,25 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { +class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCurrentFabricIndex() - : SubscribeAttribute("current-fabric-index") + SubscribeAttributeFixedLabelLabelList() + : SubscribeAttribute("label-list") { } - ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + ~SubscribeAttributeFixedLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45709,10 +45637,10 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentFabricIndexWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45728,32 +45656,32 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr /* * Attribute GeneratedCommandList */ -class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { +class ReadFixedLabelGeneratedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsGeneratedCommandList() + ReadFixedLabelGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOperationalCredentialsGeneratedCommandList() + ~ReadFixedLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + LogNSError("FixedLabel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45762,25 +45690,25 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsGeneratedCommandList() + SubscribeAttributeFixedLabelGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() + ~SubscribeAttributeFixedLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45794,7 +45722,7 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45810,32 +45738,32 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs /* * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { +class ReadFixedLabelAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsAcceptedCommandList() + ReadFixedLabelAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsAcceptedCommandList() + ~ReadFixedLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + LogNSError("FixedLabel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45844,25 +45772,25 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAcceptedCommandList() + SubscribeAttributeFixedLabelAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() + ~SubscribeAttributeFixedLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45876,7 +45804,7 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45894,32 +45822,32 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc /* * Attribute EventList */ -class ReadOperationalCredentialsEventList : public ReadAttribute { +class ReadFixedLabelEventList : public ReadAttribute { public: - ReadOperationalCredentialsEventList() + ReadFixedLabelEventList() : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsEventList() + ~ReadFixedLabelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.EventList response %@", [value description]); + NSLog(@"FixedLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials EventList read Error", error); + LogNSError("FixedLabel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45928,25 +45856,25 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsEventList() + SubscribeAttributeFixedLabelEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsEventList() + ~SubscribeAttributeFixedLabelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45960,7 +45888,7 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.EventList response %@", [value description]); + NSLog(@"FixedLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45978,32 +45906,32 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadOperationalCredentialsAttributeList : public ReadAttribute { +class ReadFixedLabelAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsAttributeList() + ReadFixedLabelAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsAttributeList() + ~ReadFixedLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AttributeList read Error", error); + LogNSError("FixedLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46012,25 +45940,25 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAttributeList() + SubscribeAttributeFixedLabelAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsAttributeList() + ~SubscribeAttributeFixedLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46044,7 +45972,7 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46060,32 +45988,32 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt /* * Attribute FeatureMap */ -class ReadOperationalCredentialsFeatureMap : public ReadAttribute { +class ReadFixedLabelFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsFeatureMap() + ReadFixedLabelFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsFeatureMap() + ~ReadFixedLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials FeatureMap read Error", error); + LogNSError("FixedLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46094,25 +46022,25 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFeatureMap() + SubscribeAttributeFixedLabelFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsFeatureMap() + ~SubscribeAttributeFixedLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46126,7 +46054,7 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46142,32 +46070,32 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri /* * Attribute ClusterRevision */ -class ReadOperationalCredentialsClusterRevision : public ReadAttribute { +class ReadFixedLabelClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsClusterRevision() + ReadFixedLabelClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsClusterRevision() + ~ReadFixedLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials ClusterRevision read Error", error); + LogNSError("FixedLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46176,25 +46104,25 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsClusterRevision() + SubscribeAttributeFixedLabelClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsClusterRevision() + ~SubscribeAttributeFixedLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46208,7 +46136,7 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46222,19 +46150,12 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe }; /*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | +| Cluster UserLabel | 0x0041 | |------------------------------------------------------------------------------| | Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | +| * LabelList | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -46246,269 +46167,336 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe \*----------------------------------------------------------------------------*/ /* - * Command KeySetWrite + * Attribute LabelList */ -class GroupKeyManagementKeySetWrite : public ClusterCommand { +class ReadUserLabelLabelList : public ReadAttribute { public: - GroupKeyManagementKeySetWrite() - : ClusterCommand("key-set-write") - , mComplex_GroupKeySet(&mRequest.groupKeySet) + ReadUserLabelLabelList() + : ReadAttribute("label-list") + { + } + + ~ReadUserLabelLabelList() { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; - params.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; - if (mRequest.groupKeySet.epochKey0.IsNull()) { - params.groupKeySet.epochKey0 = nil; - } else { - params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() length:mRequest.groupKeySet.epochKey0.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime0.IsNull()) { - params.groupKeySet.epochStartTime0 = nil; - } else { - params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; - } - if (mRequest.groupKeySet.epochKey1.IsNull()) { - params.groupKeySet.epochKey1 = nil; - } else { - params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() length:mRequest.groupKeySet.epochKey1.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime1.IsNull()) { - params.groupKeySet.epochStartTime1 = nil; - } else { - params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; - } - if (mRequest.groupKeySet.epochKey2.IsNull()) { - params.groupKeySet.epochKey2 = nil; - } else { - params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() length:mRequest.groupKeySet.epochKey2.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime2.IsNull()) { - params.groupKeySet.epochStartTime2 = nil; - } else { - params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetWriteWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UserLabel LabelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteUserLabelLabelList : public WriteAttribute { +public: + WriteUserLabelLabelList() + : WriteAttribute("label-list") + , mComplex(&mValue) + { + AddArgument("attr-name", "label-list"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); + } + + ~WriteUserLabelLabelList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + value = array_0; } + + [cluster writeAttributeLabelListWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UserLabel LabelList write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -/* - * Command KeySetRead - */ -class GroupKeyManagementKeySetRead : public ClusterCommand { +class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { public: - GroupKeyManagementKeySetRead() - : ClusterCommand("key-set-read") + SubscribeAttributeUserLabelLabelList() + : SubscribeAttribute("label-list") { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeUserLabelLabelList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetReadWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLabelListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command KeySetRemove + * Attribute GeneratedCommandList */ -class GroupKeyManagementKeySetRemove : public ClusterCommand { +class ReadUserLabelGeneratedCommandList : public ReadAttribute { public: - GroupKeyManagementKeySetRemove() - : ClusterCommand("key-set-remove") + ReadUserLabelGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadUserLabelGeneratedCommandList() { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetRemoveWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UserLabel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; +class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeUserLabelGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* - * Command KeySetReadAllIndices + * Attribute AcceptedCommandList */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { +class ReadUserLabelAcceptedCommandList : public ReadAttribute { public: - GroupKeyManagementKeySetReadAllIndices() - : ClusterCommand("key-set-read-all-indices") + ReadUserLabelAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadUserLabelAcceptedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetReadAllIndicesWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UserLabel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: +class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeUserLabelAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GroupKeyMap + * Attribute EventList */ -class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { +class ReadUserLabelEventList : public ReadAttribute { public: - ReadGroupKeyManagementGroupKeyMap() - : ReadAttribute("group-key-map") + ReadUserLabelEventList() + : ReadAttribute("event-list") { } - ~ReadGroupKeyManagementGroupKeyMap() + ~ReadUserLabelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + LogNSError("UserLabel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46517,80 +46505,109 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { } }; -class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { +class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeUserLabelEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute AttributeList + */ +class ReadUserLabelAttributeList : public ReadAttribute { public: - WriteGroupKeyManagementGroupKeyMap() - : WriteAttribute("group-key-map") - , mComplex(&mValue) + ReadUserLabelAttributeList() + : ReadAttribute("attribute-list") { - AddArgument("attr-name", "group-key-map"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); } - ~WriteGroupKeyManagementGroupKeyMap() + ~ReadUserLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeGroupKeyMapWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UserLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; }; -class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { +class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGroupKeyMap() - : SubscribeAttribute("group-key-map") + SubscribeAttributeUserLabelAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeGroupKeyManagementGroupKeyMap() + ~SubscribeAttributeUserLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46601,10 +46618,10 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupKeyMapWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + NSLog(@"UserLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46618,38 +46635,34 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut }; /* - * Attribute GroupTable + * Attribute FeatureMap */ -class ReadGroupKeyManagementGroupTable : public ReadAttribute { +class ReadUserLabelFeatureMap : public ReadAttribute { public: - ReadGroupKeyManagementGroupTable() - : ReadAttribute("group-table") + ReadUserLabelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadGroupKeyManagementGroupTable() + ~ReadUserLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GroupTable read Error", error); + LogNSError("UserLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46658,25 +46671,25 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { +class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGroupTable() - : SubscribeAttribute("group-table") + SubscribeAttributeUserLabelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGroupKeyManagementGroupTable() + ~SubscribeAttributeUserLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46687,10 +46700,10 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupTableWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46704,34 +46717,34 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute }; /* - * Attribute MaxGroupsPerFabric + * Attribute ClusterRevision */ -class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { +class ReadUserLabelClusterRevision : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupsPerFabric() - : ReadAttribute("max-groups-per-fabric") + ReadUserLabelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadGroupKeyManagementMaxGroupsPerFabric() + ~ReadUserLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); + LogNSError("UserLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46740,25 +46753,25 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { +class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() - : SubscribeAttribute("max-groups-per-fabric") + SubscribeAttributeUserLabelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + ~SubscribeAttributeUserLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46769,10 +46782,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46785,35 +46798,53 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } }; +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MaxGroupKeysPerFabric + * Attribute StateValue */ -class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { +class ReadBooleanStateStateValue : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupKeysPerFabric() - : ReadAttribute("max-group-keys-per-fabric") + ReadBooleanStateStateValue() + : ReadAttribute("state-value") { } - ~ReadGroupKeyManagementMaxGroupKeysPerFabric() + ~ReadBooleanStateStateValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + LogNSError("BooleanState StateValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46822,25 +46853,25 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() - : SubscribeAttribute("max-group-keys-per-fabric") + SubscribeAttributeBooleanStateStateValue() + : SubscribeAttribute("state-value") { } - ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + ~SubscribeAttributeBooleanStateStateValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46851,10 +46882,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params + [cluster subscribeAttributeStateValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46870,32 +46901,32 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri /* * Attribute GeneratedCommandList */ -class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { +class ReadBooleanStateGeneratedCommandList : public ReadAttribute { public: - ReadGroupKeyManagementGeneratedCommandList() + ReadBooleanStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadGroupKeyManagementGeneratedCommandList() + ~ReadBooleanStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); + LogNSError("BooleanState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46904,25 +46935,25 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGeneratedCommandList() + SubscribeAttributeBooleanStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() + ~SubscribeAttributeBooleanStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46936,7 +46967,7 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46952,32 +46983,32 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { +class ReadBooleanStateAcceptedCommandList : public ReadAttribute { public: - ReadGroupKeyManagementAcceptedCommandList() + ReadBooleanStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadGroupKeyManagementAcceptedCommandList() + ~ReadBooleanStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); + LogNSError("BooleanState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46986,25 +47017,25 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAcceptedCommandList() + SubscribeAttributeBooleanStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() + ~SubscribeAttributeBooleanStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47018,7 +47049,7 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47036,32 +47067,32 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadGroupKeyManagementEventList : public ReadAttribute { +class ReadBooleanStateEventList : public ReadAttribute { public: - ReadGroupKeyManagementEventList() + ReadBooleanStateEventList() : ReadAttribute("event-list") { } - ~ReadGroupKeyManagementEventList() + ~ReadBooleanStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + NSLog(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement EventList read Error", error); + LogNSError("BooleanState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47070,25 +47101,25 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementEventList() + SubscribeAttributeBooleanStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeGroupKeyManagementEventList() + ~SubscribeAttributeBooleanStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47102,7 +47133,7 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + NSLog(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47120,32 +47151,32 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadGroupKeyManagementAttributeList : public ReadAttribute { +class ReadBooleanStateAttributeList : public ReadAttribute { public: - ReadGroupKeyManagementAttributeList() + ReadBooleanStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadGroupKeyManagementAttributeList() + ~ReadBooleanStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement AttributeList read Error", error); + LogNSError("BooleanState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47154,25 +47185,25 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAttributeList() + SubscribeAttributeBooleanStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeGroupKeyManagementAttributeList() + ~SubscribeAttributeBooleanStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47186,7 +47217,7 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47202,32 +47233,32 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadGroupKeyManagementFeatureMap : public ReadAttribute { +class ReadBooleanStateFeatureMap : public ReadAttribute { public: - ReadGroupKeyManagementFeatureMap() + ReadBooleanStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadGroupKeyManagementFeatureMap() + ~ReadBooleanStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement FeatureMap read Error", error); + LogNSError("BooleanState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47236,25 +47267,25 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementFeatureMap() + SubscribeAttributeBooleanStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGroupKeyManagementFeatureMap() + ~SubscribeAttributeBooleanStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47268,7 +47299,7 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47284,32 +47315,32 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadGroupKeyManagementClusterRevision : public ReadAttribute { +class ReadBooleanStateClusterRevision : public ReadAttribute { public: - ReadGroupKeyManagementClusterRevision() + ReadBooleanStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadGroupKeyManagementClusterRevision() + ~ReadBooleanStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement ClusterRevision read Error", error); + LogNSError("BooleanState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47318,25 +47349,25 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementClusterRevision() + SubscribeAttributeBooleanStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGroupKeyManagementClusterRevision() + ~SubscribeAttributeBooleanStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47350,7 +47381,7 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47363,13 +47394,25 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | +| Cluster IcdManagement | 0x0046 | |------------------------------------------------------------------------------| | Commands: | | +| * RegisterClient | 0x00 | +| * UnregisterClient | 0x02 | +| * StayActiveRequest | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * LabelList | 0x0000 | +| * IdleModeDuration | 0x0000 | +| * ActiveModeDuration | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * RegisteredClients | 0x0003 | +| * ICDCounter | 0x0004 | +| * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | +| * OperatingMode | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -47378,37 +47421,237 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OnTransitionToActiveMode | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute LabelList + * Command RegisterClient */ -class ReadFixedLabelLabelList : public ReadAttribute { +class IcdManagementRegisterClient : public ClusterCommand { public: - ReadFixedLabelLabelList() - : ReadAttribute("label-list") + IcdManagementRegisterClient() + : ClusterCommand("register-client") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Key", &mRequest.key); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadFixedLabelLabelList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.verificationKey.HasValue()) { + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; + } else { + params.verificationKey = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster registerClientWithParams:params completion: + ^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnregisterClient + */ +class IcdManagementUnregisterClient : public ClusterCommand { +public: + IcdManagementUnregisterClient() + : ClusterCommand("unregister-client") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.verificationKey.HasValue()) { + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; + } else { + params.verificationKey = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unregisterClientWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StayActiveRequest + */ +class IcdManagementStayActiveRequest : public ClusterCommand { +public: + IcdManagementStayActiveRequest() + : ClusterCommand("stay-active-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stayActiveRequestWithParams:params completion: + ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute IdleModeDuration + */ +class ReadIcdManagementIdleModeDuration : public ReadAttribute { +public: + ReadIcdManagementIdleModeDuration() + : ReadAttribute("idle-mode-duration") + { + } + + ~ReadIcdManagementIdleModeDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeIdleModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel LabelList read Error", error); + LogNSError("ICDManagement IdleModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47417,25 +47660,25 @@ class ReadFixedLabelLabelList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeIcdManagementIdleModeDuration() + : SubscribeAttribute("idle-mode-duration") { } - ~SubscribeAttributeFixedLabelLabelList() + ~SubscribeAttributeIcdManagementIdleModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47446,10 +47689,10 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeIdleModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47462,35 +47705,38 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute ActiveModeDuration */ -class ReadFixedLabelGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementActiveModeDuration : public ReadAttribute { public: - ReadFixedLabelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadIcdManagementActiveModeDuration() + : ReadAttribute("active-mode-duration") { } - ~ReadFixedLabelGeneratedCommandList() + ~ReadIcdManagementActiveModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel GeneratedCommandList read Error", error); + LogNSError("ICDManagement ActiveModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47499,25 +47745,25 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeIcdManagementActiveModeDuration() + : SubscribeAttribute("active-mode-duration") { } - ~SubscribeAttributeFixedLabelGeneratedCommandList() + ~SubscribeAttributeIcdManagementActiveModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47528,10 +47774,10 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeActiveModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47544,35 +47790,38 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute ActiveModeThreshold */ -class ReadFixedLabelAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementActiveModeThreshold : public ReadAttribute { public: - ReadFixedLabelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIcdManagementActiveModeThreshold() + : ReadAttribute("active-mode-threshold") { } - ~ReadFixedLabelAcceptedCommandList() + ~ReadIcdManagementActiveModeThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AcceptedCommandList read Error", error); + LogNSError("ICDManagement ActiveModeThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47581,25 +47830,25 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIcdManagementActiveModeThreshold() + : SubscribeAttribute("active-mode-threshold") { } - ~SubscribeAttributeFixedLabelAcceptedCommandList() + ~SubscribeAttributeIcdManagementActiveModeThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47610,10 +47859,10 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeActiveModeThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47626,37 +47875,42 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute RegisteredClients */ -class ReadFixedLabelEventList : public ReadAttribute { +class ReadIcdManagementRegisteredClients : public ReadAttribute { public: - ReadFixedLabelEventList() - : ReadAttribute("event-list") + ReadIcdManagementRegisteredClients() + : ReadAttribute("registered-clients") { } - ~ReadFixedLabelEventList() + ~ReadIcdManagementRegisteredClients() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel EventList read Error", error); + LogNSError("ICDManagement RegisteredClients read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47665,25 +47919,25 @@ class ReadFixedLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeIcdManagementRegisteredClients() + : SubscribeAttribute("registered-clients") { } - ~SubscribeAttributeFixedLabelEventList() + ~SubscribeAttributeIcdManagementRegisteredClients() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47694,10 +47948,10 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeRegisteredClientsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); + NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47711,36 +47965,37 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute ICDCounter */ -class ReadFixedLabelAttributeList : public ReadAttribute { +class ReadIcdManagementICDCounter : public ReadAttribute { public: - ReadFixedLabelAttributeList() - : ReadAttribute("attribute-list") + ReadIcdManagementICDCounter() + : ReadAttribute("icdcounter") { } - ~ReadFixedLabelAttributeList() + ~ReadIcdManagementICDCounter() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ICDCounter response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AttributeList read Error", error); + LogNSError("ICDManagement ICDCounter read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47749,25 +48004,25 @@ class ReadFixedLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeIcdManagementICDCounter() + : SubscribeAttribute("icdcounter") { } - ~SubscribeAttributeFixedLabelAttributeList() + ~SubscribeAttributeIcdManagementICDCounter() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47778,10 +48033,10 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeICDCounterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ICDCounter response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47794,35 +48049,38 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute ClientsSupportedPerFabric */ -class ReadFixedLabelFeatureMap : public ReadAttribute { +class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { public: - ReadFixedLabelFeatureMap() - : ReadAttribute("feature-map") + ReadIcdManagementClientsSupportedPerFabric() + : ReadAttribute("clients-supported-per-fabric") { } - ~ReadFixedLabelFeatureMap() + ~ReadIcdManagementClientsSupportedPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel FeatureMap read Error", error); + LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47831,25 +48089,25 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeIcdManagementClientsSupportedPerFabric() + : SubscribeAttribute("clients-supported-per-fabric") { } - ~SubscribeAttributeFixedLabelFeatureMap() + ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47860,10 +48118,10 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47876,35 +48134,38 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute UserActiveModeTriggerHint */ -class ReadFixedLabelClusterRevision : public ReadAttribute { +class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { public: - ReadFixedLabelClusterRevision() - : ReadAttribute("cluster-revision") + ReadIcdManagementUserActiveModeTriggerHint() + : ReadAttribute("user-active-mode-trigger-hint") { } - ~ReadFixedLabelClusterRevision() + ~ReadIcdManagementUserActiveModeTriggerHint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerHintWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel ClusterRevision read Error", error); + LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47913,25 +48174,25 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + : SubscribeAttribute("user-active-mode-trigger-hint") { } - ~SubscribeAttributeFixedLabelClusterRevision() + ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47942,10 +48203,10 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47958,52 +48219,38 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute LabelList + * Attribute UserActiveModeTriggerInstruction */ -class ReadUserLabelLabelList : public ReadAttribute { +class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { public: - ReadUserLabelLabelList() - : ReadAttribute("label-list") + ReadIcdManagementUserActiveModeTriggerInstruction() + : ReadAttribute("user-active-mode-trigger-instruction") { } - ~ReadUserLabelLabelList() + ~ReadIcdManagementUserActiveModeTriggerInstruction() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerInstructionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel LabelList read Error", error); + LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48012,79 +48259,110 @@ class ReadUserLabelLabelList : public ReadAttribute { } }; -class WriteUserLabelLabelList : public WriteAttribute { +class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { public: - WriteUserLabelLabelList() - : WriteAttribute("label-list") - , mComplex(&mValue) + SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + : SubscribeAttribute("user-active-mode-trigger-instruction") { - AddArgument("attr-name", "label-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); } - ~WriteUserLabelLabelList() + ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - value = array_0; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute OperatingMode + */ +class ReadIcdManagementOperatingMode : public ReadAttribute { +public: + ReadIcdManagementOperatingMode() + : ReadAttribute("operating-mode") + { + } - [cluster writeAttributeLabelListWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); + ~ReadIcdManagementOperatingMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement OperatingMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; }; -class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { public: - SubscribeAttributeUserLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeIcdManagementOperatingMode() + : SubscribeAttribute("operating-mode") { } - ~SubscribeAttributeUserLabelLabelList() + ~SubscribeAttributeIcdManagementOperatingMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48095,10 +48373,10 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.OperatingMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48111,35 +48389,38 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadUserLabelGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementGeneratedCommandList : public ReadAttribute { public: - ReadUserLabelGeneratedCommandList() + ReadIcdManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadUserLabelGeneratedCommandList() + ~ReadIcdManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel GeneratedCommandList read Error", error); + LogNSError("ICDManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48148,25 +48429,25 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelGeneratedCommandList() + SubscribeAttributeIcdManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeUserLabelGeneratedCommandList() + ~SubscribeAttributeIcdManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48180,7 +48461,7 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48193,35 +48474,38 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadUserLabelAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementAcceptedCommandList : public ReadAttribute { public: - ReadUserLabelAcceptedCommandList() + ReadIcdManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadUserLabelAcceptedCommandList() + ~ReadIcdManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel AcceptedCommandList read Error", error); + LogNSError("ICDManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48230,25 +48514,25 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAcceptedCommandList() + SubscribeAttributeIcdManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeUserLabelAcceptedCommandList() + ~SubscribeAttributeIcdManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48262,7 +48546,7 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48275,37 +48559,38 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadUserLabelEventList : public ReadAttribute { +class ReadIcdManagementEventList : public ReadAttribute { public: - ReadUserLabelEventList() + ReadIcdManagementEventList() : ReadAttribute("event-list") { } - ~ReadUserLabelEventList() + ~ReadIcdManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel EventList read Error", error); + LogNSError("ICDManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48314,25 +48599,25 @@ class ReadUserLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelEventList() + SubscribeAttributeIcdManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeUserLabelEventList() + ~SubscribeAttributeIcdManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48346,7 +48631,7 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48360,36 +48645,37 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadUserLabelAttributeList : public ReadAttribute { +class ReadIcdManagementAttributeList : public ReadAttribute { public: - ReadUserLabelAttributeList() + ReadIcdManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadUserLabelAttributeList() + ~ReadIcdManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel AttributeList read Error", error); + LogNSError("ICDManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48398,25 +48684,25 @@ class ReadUserLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAttributeList() + SubscribeAttributeIcdManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeUserLabelAttributeList() + ~SubscribeAttributeIcdManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48430,7 +48716,7 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48443,35 +48729,38 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadUserLabelFeatureMap : public ReadAttribute { +class ReadIcdManagementFeatureMap : public ReadAttribute { public: - ReadUserLabelFeatureMap() + ReadIcdManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadUserLabelFeatureMap() + ~ReadIcdManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel FeatureMap read Error", error); + LogNSError("ICDManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48480,25 +48769,25 @@ class ReadUserLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeUserLabelFeatureMap() + SubscribeAttributeIcdManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeUserLabelFeatureMap() + ~SubscribeAttributeIcdManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48512,7 +48801,7 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48525,35 +48814,38 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadUserLabelClusterRevision : public ReadAttribute { +class ReadIcdManagementClusterRevision : public ReadAttribute { public: - ReadUserLabelClusterRevision() + ReadIcdManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadUserLabelClusterRevision() + ~ReadIcdManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel ClusterRevision read Error", error); + LogNSError("ICDManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48562,25 +48854,25 @@ class ReadUserLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeUserLabelClusterRevision() + SubscribeAttributeIcdManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeUserLabelClusterRevision() + ~SubscribeAttributeIcdManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48594,7 +48886,7 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48607,13 +48899,22 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | +| Cluster Timer | 0x0047 | |------------------------------------------------------------------------------| | Commands: | | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * StateValue | 0x0000 | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -48622,120 +48923,245 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StateChange | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute StateValue + * Command SetTimer */ -class ReadBooleanStateStateValue : public ReadAttribute { +class TimerSetTimer : public ClusterCommand { public: - ReadBooleanStateStateValue() - : ReadAttribute("state-value") + TimerSetTimer() + : ClusterCommand("set-timer") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadBooleanStateStateValue() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterSetTimerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newTime = [NSNumber numberWithUnsignedInt:mRequest.newTime]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTimerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResetTimer + */ +class TimerResetTimer : public ClusterCommand { +public: + TimerResetTimer() + : ClusterCommand("reset-timer") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BooleanState StateValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterResetTimerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resetTimerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddTime + */ +class TimerAddTime : public ClusterCommand { public: - SubscribeAttributeBooleanStateStateValue() - : SubscribeAttribute("state-value") + TimerAddTime() + : ClusterCommand("add-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~SubscribeAttributeBooleanStateStateValue() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterAddTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.additionalTime = [NSNumber numberWithUnsignedInt:mRequest.additionalTime]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ReduceTime + */ +class TimerReduceTime : public ClusterCommand { +public: + TimerReduceTime() + : ClusterCommand("reduce-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterReduceTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.timeReduction = [NSNumber numberWithUnsignedInt:mRequest.timeReduction]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster reduceTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeStateValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute SetTime */ -class ReadBooleanStateGeneratedCommandList : public ReadAttribute { +class ReadTimerSetTime : public ReadAttribute { public: - ReadBooleanStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimerSetTime() + : ReadAttribute("set-time") { } - ~ReadBooleanStateGeneratedCommandList() + ~ReadTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState GeneratedCommandList read Error", error); + LogNSError("Timer SetTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48744,25 +49170,25 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerSetTime : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimerSetTime() + : SubscribeAttribute("set-time") { } - ~SubscribeAttributeBooleanStateGeneratedCommandList() + ~SubscribeAttributeTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48773,10 +49199,10 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSetTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48789,35 +49215,38 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute TimeRemaining */ -class ReadBooleanStateAcceptedCommandList : public ReadAttribute { +class ReadTimerTimeRemaining : public ReadAttribute { public: - ReadBooleanStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTimerTimeRemaining() + : ReadAttribute("time-remaining") { } - ~ReadBooleanStateAcceptedCommandList() + ~ReadTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState AcceptedCommandList read Error", error); + LogNSError("Timer TimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48826,25 +49255,25 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTimerTimeRemaining() + : SubscribeAttribute("time-remaining") { } - ~SubscribeAttributeBooleanStateAcceptedCommandList() + ~SubscribeAttributeTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48855,10 +49284,10 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48871,37 +49300,38 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute TimerState */ -class ReadBooleanStateEventList : public ReadAttribute { +class ReadTimerTimerState : public ReadAttribute { public: - ReadBooleanStateEventList() - : ReadAttribute("event-list") + ReadTimerTimerState() + : ReadAttribute("timer-state") { } - ~ReadBooleanStateEventList() + ~ReadTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimerStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState EventList read Error", error); + LogNSError("Timer TimerState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48910,25 +49340,25 @@ class ReadBooleanStateEventList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { +class SubscribeAttributeTimerTimerState : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTimerTimerState() + : SubscribeAttribute("timer-state") { } - ~SubscribeAttributeBooleanStateEventList() + ~SubscribeAttributeTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48939,10 +49369,10 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTimerStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48956,36 +49386,37 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadBooleanStateAttributeList : public ReadAttribute { +class ReadTimerGeneratedCommandList : public ReadAttribute { public: - ReadBooleanStateAttributeList() - : ReadAttribute("attribute-list") + ReadTimerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBooleanStateAttributeList() + ~ReadTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState AttributeList read Error", error); + LogNSError("Timer GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48994,25 +49425,25 @@ class ReadBooleanStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTimerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBooleanStateAttributeList() + ~SubscribeAttributeTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49023,10 +49454,10 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49039,35 +49470,38 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadBooleanStateFeatureMap : public ReadAttribute { +class ReadTimerAcceptedCommandList : public ReadAttribute { public: - ReadBooleanStateFeatureMap() - : ReadAttribute("feature-map") + ReadTimerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBooleanStateFeatureMap() + ~ReadTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState FeatureMap read Error", error); + LogNSError("Timer AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49076,25 +49510,25 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTimerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBooleanStateFeatureMap() + ~SubscribeAttributeTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49105,10 +49539,10 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49121,35 +49555,38 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadBooleanStateClusterRevision : public ReadAttribute { +class ReadTimerEventList : public ReadAttribute { public: - ReadBooleanStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadTimerEventList() + : ReadAttribute("event-list") { } - ~ReadBooleanStateClusterRevision() + ~ReadTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState ClusterRevision read Error", error); + LogNSError("Timer EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49158,25 +49595,25 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTimerEventList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTimerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBooleanStateClusterRevision() + ~SubscribeAttributeTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49187,10 +49624,10 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49203,264 +49640,123 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster IcdManagement | 0x0046 | -|------------------------------------------------------------------------------| -| Commands: | | -| * RegisterClient | 0x00 | -| * UnregisterClient | 0x02 | -| * StayActiveRequest | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * IdleModeDuration | 0x0000 | -| * ActiveModeDuration | 0x0001 | -| * ActiveModeThreshold | 0x0002 | -| * RegisteredClients | 0x0003 | -| * ICDCounter | 0x0004 | -| * ClientsSupportedPerFabric | 0x0005 | -| * UserActiveModeTriggerHint | 0x0006 | -| * UserActiveModeTriggerInstruction | 0x0007 | -| * OperatingMode | 0x0008 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OnTransitionToActiveMode | 0x0000 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command RegisterClient + * Attribute AttributeList */ -class IcdManagementRegisterClient : public ClusterCommand { +class ReadTimerAttributeList : public ReadAttribute { public: - IcdManagementRegisterClient() - : ClusterCommand("register-client") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Key", &mRequest.key); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadTimerAttributeList() + : ReadAttribute("attribute-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.verificationKey.HasValue()) { - params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; - } else { - params.verificationKey = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster registerClientWithParams:params completion: - ^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command UnregisterClient - */ -class IcdManagementUnregisterClient : public ClusterCommand { -public: - IcdManagementUnregisterClient() - : ClusterCommand("unregister-client") + ~ReadTimerAttributeList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.verificationKey.HasValue()) { - params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; - } else { - params.verificationKey = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unregisterClientWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Timer AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command StayActiveRequest - */ -class IcdManagementStayActiveRequest : public ClusterCommand { +class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { public: - IcdManagementStayActiveRequest() - : ClusterCommand("stay-active-request") + SubscribeAttributeTimerAttributeList() + : SubscribeAttribute("attribute-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeTimerAttributeList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stayActiveRequestWithParams:params completion: - ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute IdleModeDuration + * Attribute FeatureMap */ -class ReadIcdManagementIdleModeDuration : public ReadAttribute { +class ReadTimerFeatureMap : public ReadAttribute { public: - ReadIcdManagementIdleModeDuration() - : ReadAttribute("idle-mode-duration") + ReadTimerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadIcdManagementIdleModeDuration() + ~ReadTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdleModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement IdleModeDuration read Error", error); + LogNSError("Timer FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49469,25 +49765,25 @@ class ReadIcdManagementIdleModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { +class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementIdleModeDuration() - : SubscribeAttribute("idle-mode-duration") + SubscribeAttributeTimerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIcdManagementIdleModeDuration() + ~SubscribeAttributeTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49498,10 +49794,10 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIdleModeDurationWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49518,34 +49814,34 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeDuration + * Attribute ClusterRevision */ -class ReadIcdManagementActiveModeDuration : public ReadAttribute { +class ReadTimerClusterRevision : public ReadAttribute { public: - ReadIcdManagementActiveModeDuration() - : ReadAttribute("active-mode-duration") + ReadTimerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadIcdManagementActiveModeDuration() + ~ReadTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ActiveModeDuration read Error", error); + LogNSError("Timer ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49554,25 +49850,25 @@ class ReadIcdManagementActiveModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { +class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementActiveModeDuration() - : SubscribeAttribute("active-mode-duration") + SubscribeAttributeTimerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIcdManagementActiveModeDuration() + ~SubscribeAttributeTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49583,10 +49879,10 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveModeDurationWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49599,127 +49895,277 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OvenCavityOperationalState | 0x0048 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeThreshold + * Command Pause */ -class ReadIcdManagementActiveModeThreshold : public ReadAttribute { +class OvenCavityOperationalStatePause : public ClusterCommand { public: - ReadIcdManagementActiveModeThreshold() - : ReadAttribute("active-mode-threshold") + OvenCavityOperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } - ~ReadIcdManagementActiveModeThreshold() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class OvenCavityOperationalStateStop : public ClusterCommand { +public: + OvenCavityOperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ICDManagement ActiveModeThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Start + */ +class OvenCavityOperationalStateStart : public ClusterCommand { public: - SubscribeAttributeIcdManagementActiveModeThreshold() - : SubscribeAttribute("active-mode-threshold") + OvenCavityOperationalStateStart() + : ClusterCommand("start") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeIcdManagementActiveModeThreshold() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class OvenCavityOperationalStateResume : public ClusterCommand { +public: + OvenCavityOperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeActiveModeThresholdWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute RegisteredClients + * Attribute PhaseList */ -class ReadIcdManagementRegisteredClients : public ReadAttribute { +class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { public: - ReadIcdManagementRegisteredClients() - : ReadAttribute("registered-clients") + ReadOvenCavityOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadIcdManagementRegisteredClients() + ~ReadOvenCavityOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement RegisteredClients read Error", error); + LogNSError("OvenCavityOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49728,25 +50174,25 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementRegisteredClients() - : SubscribeAttribute("registered-clients") + SubscribeAttributeOvenCavityOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeIcdManagementRegisteredClients() + ~SubscribeAttributeOvenCavityOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49757,10 +50203,10 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRegisteredClientsWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49777,34 +50223,34 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute ICDCounter + * Attribute CurrentPhase */ -class ReadIcdManagementICDCounter : public ReadAttribute { +class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { public: - ReadIcdManagementICDCounter() - : ReadAttribute("icdcounter") + ReadOvenCavityOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadIcdManagementICDCounter() + ~ReadOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ICDCounter read Error", error); + LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49813,25 +50259,25 @@ class ReadIcdManagementICDCounter : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementICDCounter() - : SubscribeAttribute("icdcounter") + SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeIcdManagementICDCounter() + ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49842,10 +50288,10 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeICDCounterWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49862,34 +50308,34 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClientsSupportedPerFabric + * Attribute CountdownTime */ -class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { +class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { public: - ReadIcdManagementClientsSupportedPerFabric() - : ReadAttribute("clients-supported-per-fabric") + ReadOvenCavityOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadIcdManagementClientsSupportedPerFabric() + ~ReadOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); + LogNSError("OvenCavityOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49898,25 +50344,25 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClientsSupportedPerFabric() - : SubscribeAttribute("clients-supported-per-fabric") + SubscribeAttributeOvenCavityOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() + ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49927,10 +50373,10 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49947,34 +50393,34 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerHint + * Attribute OperationalStateList */ -class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerHint() - : ReadAttribute("user-active-mode-trigger-hint") + ReadOvenCavityOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadIcdManagementUserActiveModeTriggerHint() + ~ReadOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserActiveModeTriggerHintWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); + LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49983,25 +50429,25 @@ class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerHint() - : SubscribeAttribute("user-active-mode-trigger-hint") + SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50012,10 +50458,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50032,34 +50478,34 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerInstruction + * Attribute OperationalState */ -class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerInstruction() - : ReadAttribute("user-active-mode-trigger-instruction") + ReadOvenCavityOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadIcdManagementUserActiveModeTriggerInstruction() + ~ReadOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserActiveModeTriggerInstructionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); + LogNSError("OvenCavityOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50068,25 +50514,25 @@ class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() - : SubscribeAttribute("user-active-mode-trigger-instruction") + SubscribeAttributeOvenCavityOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + ~SubscribeAttributeOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50097,10 +50543,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50117,34 +50563,34 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperatingMode + * Attribute OperationalError */ -class ReadIcdManagementOperatingMode : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { public: - ReadIcdManagementOperatingMode() - : ReadAttribute("operating-mode") + ReadOvenCavityOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadIcdManagementOperatingMode() + ~ReadOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement OperatingMode read Error", error); + LogNSError("OvenCavityOperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50153,25 +50599,25 @@ class ReadIcdManagementOperatingMode : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementOperatingMode() - : SubscribeAttribute("operating-mode") + SubscribeAttributeOvenCavityOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeIcdManagementOperatingMode() + ~SubscribeAttributeOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50182,10 +50628,10 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperatingModeWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + reportHandler:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50204,32 +50650,32 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadIcdManagementGeneratedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadIcdManagementGeneratedCommandList() + ReadOvenCavityOperationalStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadIcdManagementGeneratedCommandList() + ~ReadOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement GeneratedCommandList read Error", error); + LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50238,25 +50684,25 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementGeneratedCommandList() + SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIcdManagementGeneratedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50270,7 +50716,7 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50289,32 +50735,32 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr /* * Attribute AcceptedCommandList */ -class ReadIcdManagementAcceptedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadIcdManagementAcceptedCommandList() + ReadOvenCavityOperationalStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadIcdManagementAcceptedCommandList() + ~ReadOvenCavityOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement AcceptedCommandList read Error", error); + LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50323,25 +50769,25 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementAcceptedCommandList() + SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIcdManagementAcceptedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50355,7 +50801,7 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50374,32 +50820,32 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri /* * Attribute EventList */ -class ReadIcdManagementEventList : public ReadAttribute { +class ReadOvenCavityOperationalStateEventList : public ReadAttribute { public: - ReadIcdManagementEventList() + ReadOvenCavityOperationalStateEventList() : ReadAttribute("event-list") { } - ~ReadIcdManagementEventList() + ~ReadOvenCavityOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.EventList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement EventList read Error", error); + LogNSError("OvenCavityOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50408,25 +50854,25 @@ class ReadIcdManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementEventList() + SubscribeAttributeOvenCavityOperationalStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIcdManagementEventList() + ~SubscribeAttributeOvenCavityOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50440,7 +50886,7 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.EventList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50459,32 +50905,32 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadIcdManagementAttributeList : public ReadAttribute { +class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { public: - ReadIcdManagementAttributeList() + ReadOvenCavityOperationalStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadIcdManagementAttributeList() + ~ReadOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AttributeList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement AttributeList read Error", error); + LogNSError("OvenCavityOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50493,25 +50939,25 @@ class ReadIcdManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementAttributeList() + SubscribeAttributeOvenCavityOperationalStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeIcdManagementAttributeList() + ~SubscribeAttributeOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50525,7 +50971,7 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AttributeList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50544,32 +50990,32 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadIcdManagementFeatureMap : public ReadAttribute { +class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { public: - ReadIcdManagementFeatureMap() + ReadOvenCavityOperationalStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadIcdManagementFeatureMap() + ~ReadOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement FeatureMap read Error", error); + LogNSError("OvenCavityOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50578,25 +51024,25 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementFeatureMap() + SubscribeAttributeOvenCavityOperationalStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIcdManagementFeatureMap() + ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50610,7 +51056,7 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50629,32 +51075,32 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadIcdManagementClusterRevision : public ReadAttribute { +class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { public: - ReadIcdManagementClusterRevision() + ReadOvenCavityOperationalStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadIcdManagementClusterRevision() + ~ReadOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ClusterRevision read Error", error); + LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50663,25 +51109,25 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClusterRevision() + SubscribeAttributeOvenCavityOperationalStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIcdManagementClusterRevision() + ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50695,7 +51141,7 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50712,18 +51158,16 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster Timer | 0x0047 | +| Cluster OvenMode | 0x0049 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTimer | 0x00 | -| * ResetTimer | 0x01 | -| * AddTime | 0x02 | -| * ReduceTime | 0x03 | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SetTime | 0x0000 | -| * TimeRemaining | 0x0001 | -| * TimerState | 0x0002 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -50736,206 +51180,60 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Command SetTimer - */ -class TimerSetTimer : public ClusterCommand { -public: - TimerSetTimer() - : ClusterCommand("set-timer") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterSetTimerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newTime = [NSNumber numberWithUnsignedInt:mRequest.newTime]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTimerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResetTimer - */ -class TimerResetTimer : public ClusterCommand { -public: - TimerResetTimer() - : ClusterCommand("reset-timer") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterResetTimerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetTimerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command AddTime - */ -class TimerAddTime : public ClusterCommand { -public: - TimerAddTime() - : ClusterCommand("add-time") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterAddTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.additionalTime = [NSNumber numberWithUnsignedInt:mRequest.additionalTime]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ReduceTime + * Command ChangeToMode */ -class TimerReduceTime : public ClusterCommand { +class OvenModeChangeToMode : public ClusterCommand { public: - TimerReduceTime() - : ClusterCommand("reduce-time") + OvenModeChangeToMode() + : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL - AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterReduceTimeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.timeReduction = [NSNumber numberWithUnsignedInt:mRequest.timeReduction]; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster reduceTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster changeToModeWithParams:params completion: + ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -50943,119 +51241,34 @@ class TimerReduceTime : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SetTime - */ -class ReadTimerSetTime : public ReadAttribute { -public: - ReadTimerSetTime() - : ReadAttribute("set-time") - { - } - - ~ReadTimerSetTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Timer SetTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTimerSetTime : public SubscribeAttribute { -public: - SubscribeAttributeTimerSetTime() - : SubscribeAttribute("set-time") - { - } - - ~SubscribeAttributeTimerSetTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSetTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute TimeRemaining + * Attribute SupportedModes */ -class ReadTimerTimeRemaining : public ReadAttribute { +class ReadOvenModeSupportedModes : public ReadAttribute { public: - ReadTimerTimeRemaining() - : ReadAttribute("time-remaining") + ReadOvenModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadTimerTimeRemaining() + ~ReadOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimeRemaining response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer TimeRemaining read Error", error); + LogNSError("OvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51064,25 +51277,25 @@ class ReadTimerTimeRemaining : public ReadAttribute { } }; -class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { +class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeTimerTimeRemaining() - : SubscribeAttribute("time-remaining") + SubscribeAttributeOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeTimerTimeRemaining() + ~SubscribeAttributeOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51093,10 +51306,10 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeRemainingWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimeRemaining response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51113,34 +51326,34 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TimerState + * Attribute CurrentMode */ -class ReadTimerTimerState : public ReadAttribute { +class ReadOvenModeCurrentMode : public ReadAttribute { public: - ReadTimerTimerState() - : ReadAttribute("timer-state") + ReadOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadTimerTimerState() + ~ReadOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimerStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimerState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer TimerState read Error", error); + LogNSError("OvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51149,25 +51362,25 @@ class ReadTimerTimerState : public ReadAttribute { } }; -class SubscribeAttributeTimerTimerState : public SubscribeAttribute { +class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeTimerTimerState() - : SubscribeAttribute("timer-state") + SubscribeAttributeOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeTimerTimerState() + ~SubscribeAttributeOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51178,10 +51391,10 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimerStateWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimerState response %@", [value description]); + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51198,34 +51411,34 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute StartUpMode */ -class ReadTimerGeneratedCommandList : public ReadAttribute { +class ReadOvenModeStartUpMode : public ReadAttribute { public: - ReadTimerGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOvenModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadTimerGeneratedCommandList() + ~ReadOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer GeneratedCommandList read Error", error); + LogNSError("OvenMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51234,110 +51447,69 @@ class ReadTimerGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { +class WriteOvenModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeTimerGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteOvenModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimerGeneratedCommandList() + ~WriteOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute AcceptedCommandList - */ -class ReadTimerAcceptedCommandList : public ReadAttribute { -public: - ReadTimerAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadTimerAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Timer AcceptedCommandList read Error", error); + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OvenMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeTimerAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOvenModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeTimerAcceptedCommandList() + ~SubscribeAttributeOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51348,10 +51520,10 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51368,34 +51540,34 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute OnMode */ -class ReadTimerEventList : public ReadAttribute { +class ReadOvenModeOnMode : public ReadAttribute { public: - ReadTimerEventList() - : ReadAttribute("event-list") + ReadOvenModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadTimerEventList() + ~ReadOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer EventList read Error", error); + LogNSError("OvenMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51404,25 +51576,69 @@ class ReadTimerEventList : public ReadAttribute { } }; -class SubscribeAttributeTimerEventList : public SubscribeAttribute { +class WriteOvenModeOnMode : public WriteAttribute { public: - SubscribeAttributeTimerEventList() - : SubscribeAttribute("event-list") + WriteOvenModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimerEventList() + ~WriteOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OvenMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeOvenModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51433,10 +51649,10 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51453,34 +51669,34 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadTimerAttributeList : public ReadAttribute { +class ReadOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadTimerAttributeList() - : ReadAttribute("attribute-list") + ReadOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTimerAttributeList() + ~ReadOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer AttributeList read Error", error); + LogNSError("OvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51489,25 +51705,25 @@ class ReadTimerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimerAttributeList() + ~SubscribeAttributeOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51518,10 +51734,10 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AttributeList response %@", [value description]); + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51538,34 +51754,34 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadTimerFeatureMap : public ReadAttribute { +class ReadOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadTimerFeatureMap() - : ReadAttribute("feature-map") + ReadOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTimerFeatureMap() + ~ReadOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer FeatureMap read Error", error); + LogNSError("OvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51574,25 +51790,25 @@ class ReadTimerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimerFeatureMap() + ~SubscribeAttributeOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51603,10 +51819,10 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51623,34 +51839,34 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadTimerClusterRevision : public ReadAttribute { +class ReadOvenModeEventList : public ReadAttribute { public: - ReadTimerClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenModeEventList() + : ReadAttribute("event-list") { } - ~ReadTimerClusterRevision() + ~ReadOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer ClusterRevision read Error", error); + LogNSError("OvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51659,25 +51875,25 @@ class ReadTimerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeTimerClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTimerClusterRevision() + ~SubscribeAttributeOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51688,10 +51904,10 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51705,276 +51921,37 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster OvenCavityOperationalState | 0x0048 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command Pause - */ -class OvenCavityOperationalStatePause : public ClusterCommand { -public: - OvenCavityOperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class OvenCavityOperationalStateStop : public ClusterCommand { -public: - OvenCavityOperationalStateStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class OvenCavityOperationalStateStart : public ClusterCommand { -public: - OvenCavityOperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Resume - */ -class OvenCavityOperationalStateResume : public ClusterCommand { -public: - OvenCavityOperationalStateResume() - : ClusterCommand("resume") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute PhaseList + * Attribute AttributeList */ -class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { +class ReadOvenModeAttributeList : public ReadAttribute { public: - ReadOvenCavityOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadOvenModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOvenCavityOperationalStatePhaseList() + ~ReadOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState PhaseList read Error", error); + LogNSError("OvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51983,25 +51960,25 @@ class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeOvenModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenCavityOperationalStatePhaseList() + ~SubscribeAttributeOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52012,10 +51989,10 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52032,34 +52009,34 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPhase + * Attribute FeatureMap */ -class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { +class ReadOvenModeFeatureMap : public ReadAttribute { public: - ReadOvenCavityOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadOvenModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOvenCavityOperationalStateCurrentPhase() + ~ReadOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); + LogNSError("OvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52068,25 +52045,25 @@ class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeOvenModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + ~SubscribeAttributeOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52097,10 +52074,10 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52117,34 +52094,34 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CountdownTime + * Attribute ClusterRevision */ -class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { +class ReadOvenModeClusterRevision : public ReadAttribute { public: - ReadOvenCavityOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadOvenModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOvenCavityOperationalStateCountdownTime() + ~ReadOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState CountdownTime read Error", error); + LogNSError("OvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52153,25 +52130,25 @@ class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() + ~SubscribeAttributeOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52182,10 +52159,10 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52199,37 +52176,57 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster LaundryDryerControls | 0x004A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedDrynessLevels | 0x0000 | +| * SelectedDrynessLevel | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalStateList + * Attribute SupportedDrynessLevels */ -class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { +class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadLaundryDryerControlsSupportedDrynessLevels() + : ReadAttribute("supported-dryness-levels") { } - ~ReadOvenCavityOperationalStateOperationalStateList() + ~ReadLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedDrynessLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); + LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52238,25 +52235,25 @@ class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + : SubscribeAttribute("supported-dryness-levels") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52267,10 +52264,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeSupportedDrynessLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52287,34 +52284,34 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalState + * Attribute SelectedDrynessLevel */ -class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { +class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadLaundryDryerControlsSelectedDrynessLevel() + : ReadAttribute("selected-dryness-level") { } - ~ReadOvenCavityOperationalStateOperationalState() + ~ReadLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedDrynessLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalState read Error", error); + LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52323,110 +52320,69 @@ class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { +class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + WriteLaundryDryerControlsSelectedDrynessLevel() + : WriteAttribute("selected-dryness-level") { + AddArgument("attr-name", "selected-dryness-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOvenCavityOperationalStateOperationalState() + ~WriteLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeOperationalStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OperationalError - */ -class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { -public: - ReadOvenCavityOperationalStateOperationalError() - : ReadAttribute("operational-error") - { - } - - ~ReadOvenCavityOperationalStateOperationalError() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OvenCavityOperationalState OperationalError read Error", error); + [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + : SubscribeAttribute("selected-dryness-level") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalError() + ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52437,10 +52393,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeSelectedDrynessLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52459,32 +52415,32 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs /* * Attribute GeneratedCommandList */ -class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateGeneratedCommandList() + ReadLaundryDryerControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenCavityOperationalStateGeneratedCommandList() + ~ReadLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); + LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52493,25 +52449,25 @@ class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + SubscribeAttributeLaundryDryerControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52525,7 +52481,7 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52544,32 +52500,32 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAcceptedCommandList() + ReadLaundryDryerControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenCavityOperationalStateAcceptedCommandList() + ~ReadLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); + LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52578,25 +52534,25 @@ class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + SubscribeAttributeLaundryDryerControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52610,7 +52566,7 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52629,32 +52585,32 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S /* * Attribute EventList */ -class ReadOvenCavityOperationalStateEventList : public ReadAttribute { +class ReadLaundryDryerControlsEventList : public ReadAttribute { public: - ReadOvenCavityOperationalStateEventList() + ReadLaundryDryerControlsEventList() : ReadAttribute("event-list") { } - ~ReadOvenCavityOperationalStateEventList() + ~ReadLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState EventList read Error", error); + LogNSError("LaundryDryerControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52663,25 +52619,25 @@ class ReadOvenCavityOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateEventList() + SubscribeAttributeLaundryDryerControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenCavityOperationalStateEventList() + ~SubscribeAttributeLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52695,7 +52651,7 @@ class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52714,32 +52670,32 @@ class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { +class ReadLaundryDryerControlsAttributeList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAttributeList() + ReadLaundryDryerControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenCavityOperationalStateAttributeList() + ~ReadLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AttributeList read Error", error); + LogNSError("LaundryDryerControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52748,25 +52704,25 @@ class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAttributeList() + SubscribeAttributeLaundryDryerControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAttributeList() + ~SubscribeAttributeLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52780,7 +52736,7 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52799,32 +52755,32 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { +class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { public: - ReadOvenCavityOperationalStateFeatureMap() + ReadLaundryDryerControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenCavityOperationalStateFeatureMap() + ~ReadLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState FeatureMap read Error", error); + LogNSError("LaundryDryerControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52833,25 +52789,25 @@ class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateFeatureMap() + SubscribeAttributeLaundryDryerControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() + ~SubscribeAttributeLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52865,7 +52821,7 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52884,32 +52840,32 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { +class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { public: - ReadOvenCavityOperationalStateClusterRevision() + ReadLaundryDryerControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenCavityOperationalStateClusterRevision() + ~ReadLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); + LogNSError("LaundryDryerControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52918,25 +52874,25 @@ class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateClusterRevision() + SubscribeAttributeLaundryDryerControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() + ~SubscribeAttributeLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52950,7 +52906,7 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52965,18 +52921,19 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OvenMode | 0x0049 | +| Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -52987,51 +52944,40 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class OvenModeChangeToMode : public ClusterCommand { +class ModeSelectChangeToMode : public ClusterCommand { public: - OvenModeChangeToMode() + ModeSelectChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } + ^(NSError * _Nullable error) { responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -53042,42 +52988,202 @@ class OvenModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL +/* + * Attribute Description + */ +class ReadModeSelectDescription : public ReadAttribute { +public: + ReadModeSelectDescription() + : ReadAttribute("description") + { + } -#if MTR_ENABLE_PROVISIONAL + ~ReadModeSelectDescription() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectDescription() + : SubscribeAttribute("description") + { + } + + ~SubscribeAttributeModeSelectDescription() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeDescriptionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute StandardNamespace + */ +class ReadModeSelectStandardNamespace : public ReadAttribute { +public: + ReadModeSelectStandardNamespace() + : ReadAttribute("standard-namespace") + { + } + + ~ReadModeSelectStandardNamespace() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect StandardNamespace read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectStandardNamespace() + : SubscribeAttribute("standard-namespace") + { + } + + ~SubscribeAttributeModeSelectStandardNamespace() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStandardNamespaceWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; /* * Attribute SupportedModes */ -class ReadOvenModeSupportedModes : public ReadAttribute { +class ReadModeSelectSupportedModes : public ReadAttribute { public: - ReadOvenModeSupportedModes() + ReadModeSelectSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadOvenModeSupportedModes() + ~ReadModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.SupportedModes response %@", [value description]); + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode SupportedModes read Error", error); + LogNSError("ModeSelect SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53086,25 +53192,25 @@ class ReadOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeOvenModeSupportedModes() + SubscribeAttributeModeSelectSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeOvenModeSupportedModes() + ~SubscribeAttributeModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53118,7 +53224,7 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.SupportedModes response %@", [value description]); + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53131,38 +53237,35 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadOvenModeCurrentMode : public ReadAttribute { +class ReadModeSelectCurrentMode : public ReadAttribute { public: - ReadOvenModeCurrentMode() + ReadModeSelectCurrentMode() : ReadAttribute("current-mode") { } - ~ReadOvenModeCurrentMode() + ~ReadModeSelectCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.CurrentMode response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode CurrentMode read Error", error); + LogNSError("ModeSelect CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53171,25 +53274,25 @@ class ReadOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeCurrentMode() + SubscribeAttributeModeSelectCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeOvenModeCurrentMode() + ~SubscribeAttributeModeSelectCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53203,7 +53306,7 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.CurrentMode response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53216,38 +53319,35 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute StartUpMode */ -class ReadOvenModeStartUpMode : public ReadAttribute { +class ReadModeSelectStartUpMode : public ReadAttribute { public: - ReadOvenModeStartUpMode() + ReadModeSelectStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadOvenModeStartUpMode() + ~ReadModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode StartUpMode read Error", error); + LogNSError("ModeSelect StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53256,9 +53356,9 @@ class ReadOvenModeStartUpMode : public ReadAttribute { } }; -class WriteOvenModeStartUpMode : public WriteAttribute { +class WriteModeSelectStartUpMode : public WriteAttribute { public: - WriteOvenModeStartUpMode() + WriteModeSelectStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -53266,18 +53366,18 @@ class WriteOvenModeStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeStartUpMode() + ~WriteModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -53288,7 +53388,7 @@ class WriteOvenModeStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode StartUpMode write Error", error); + LogNSError("ModeSelect StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53300,25 +53400,25 @@ class WriteOvenModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeStartUpMode() + SubscribeAttributeModeSelectStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeOvenModeStartUpMode() + ~SubscribeAttributeModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53332,7 +53432,7 @@ class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53345,38 +53445,35 @@ class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OnMode */ -class ReadOvenModeOnMode : public ReadAttribute { +class ReadModeSelectOnMode : public ReadAttribute { public: - ReadOvenModeOnMode() + ReadModeSelectOnMode() : ReadAttribute("on-mode") { } - ~ReadOvenModeOnMode() + ~ReadModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode OnMode read Error", error); + LogNSError("ModeSelect OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53385,9 +53482,9 @@ class ReadOvenModeOnMode : public ReadAttribute { } }; -class WriteOvenModeOnMode : public WriteAttribute { +class WriteModeSelectOnMode : public WriteAttribute { public: - WriteOvenModeOnMode() + WriteModeSelectOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -53395,18 +53492,18 @@ class WriteOvenModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeOnMode() + ~WriteModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -53417,7 +53514,7 @@ class WriteOvenModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode OnMode write Error", error); + LogNSError("ModeSelect OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53429,25 +53526,25 @@ class WriteOvenModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeOnMode() + SubscribeAttributeModeSelectOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeOvenModeOnMode() + ~SubscribeAttributeModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53461,7 +53558,7 @@ class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53474,38 +53571,35 @@ class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadOvenModeGeneratedCommandList : public ReadAttribute { +class ReadModeSelectGeneratedCommandList : public ReadAttribute { public: - ReadOvenModeGeneratedCommandList() + ReadModeSelectGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenModeGeneratedCommandList() + ~ReadModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode GeneratedCommandList read Error", error); + LogNSError("ModeSelect GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53514,25 +53608,25 @@ class ReadOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeGeneratedCommandList() + SubscribeAttributeModeSelectGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenModeGeneratedCommandList() + ~SubscribeAttributeModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53546,7 +53640,7 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53559,38 +53653,35 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadOvenModeAcceptedCommandList : public ReadAttribute { +class ReadModeSelectAcceptedCommandList : public ReadAttribute { public: - ReadOvenModeAcceptedCommandList() + ReadModeSelectAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenModeAcceptedCommandList() + ~ReadModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AcceptedCommandList read Error", error); + LogNSError("ModeSelect AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53599,25 +53690,25 @@ class ReadOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAcceptedCommandList() + SubscribeAttributeModeSelectAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenModeAcceptedCommandList() + ~SubscribeAttributeModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53631,7 +53722,7 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53644,38 +53735,37 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadOvenModeEventList : public ReadAttribute { +class ReadModeSelectEventList : public ReadAttribute { public: - ReadOvenModeEventList() + ReadModeSelectEventList() : ReadAttribute("event-list") { } - ~ReadOvenModeEventList() + ~ReadModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode EventList read Error", error); + LogNSError("ModeSelect EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53684,25 +53774,25 @@ class ReadOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeEventList() + SubscribeAttributeModeSelectEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenModeEventList() + ~SubscribeAttributeModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53716,7 +53806,7 @@ class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53730,37 +53820,36 @@ class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadOvenModeAttributeList : public ReadAttribute { +class ReadModeSelectAttributeList : public ReadAttribute { public: - ReadOvenModeAttributeList() + ReadModeSelectAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenModeAttributeList() + ~ReadModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AttributeList read Error", error); + LogNSError("ModeSelect AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53769,25 +53858,25 @@ class ReadOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAttributeList() + SubscribeAttributeModeSelectAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenModeAttributeList() + ~SubscribeAttributeModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53801,7 +53890,7 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53814,38 +53903,35 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadOvenModeFeatureMap : public ReadAttribute { +class ReadModeSelectFeatureMap : public ReadAttribute { public: - ReadOvenModeFeatureMap() + ReadModeSelectFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenModeFeatureMap() + ~ReadModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode FeatureMap read Error", error); + LogNSError("ModeSelect FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53854,25 +53940,25 @@ class ReadOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenModeFeatureMap() + SubscribeAttributeModeSelectFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenModeFeatureMap() + ~SubscribeAttributeModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53886,7 +53972,7 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53899,38 +53985,35 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadOvenModeClusterRevision : public ReadAttribute { +class ReadModeSelectClusterRevision : public ReadAttribute { public: - ReadOvenModeClusterRevision() + ReadModeSelectClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenModeClusterRevision() + ~ReadModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode ClusterRevision read Error", error); + LogNSError("ModeSelect ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53939,25 +54022,25 @@ class ReadOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenModeClusterRevision() + SubscribeAttributeModeSelectClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenModeClusterRevision() + ~SubscribeAttributeModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53971,7 +54054,7 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53984,17 +54067,18 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryDryerControls | 0x004A | +| Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDrynessLevels | 0x0000 | -| * SelectedDrynessLevel | 0x0001 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -54005,37 +54089,97 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class LaundryWasherModeChangeToMode : public ClusterCommand { +public: + LaundryWasherModeChangeToMode() + : ClusterCommand("change-to-mode") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedDrynessLevels + * Attribute SupportedModes */ -class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { +class ReadLaundryWasherModeSupportedModes : public ReadAttribute { public: - ReadLaundryDryerControlsSupportedDrynessLevels() - : ReadAttribute("supported-dryness-levels") + ReadLaundryWasherModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadLaundryDryerControlsSupportedDrynessLevels() + ~ReadLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedDrynessLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); + LogNSError("LaundryWasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54044,25 +54188,25 @@ class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() - : SubscribeAttribute("supported-dryness-levels") + SubscribeAttributeLaundryWasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + ~SubscribeAttributeLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54073,10 +54217,10 @@ class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedDrynessLevelsWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54093,34 +54237,248 @@ class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedDrynessLevel + * Attribute CurrentMode */ -class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { +class ReadLaundryWasherModeCurrentMode : public ReadAttribute { public: - ReadLaundryDryerControlsSelectedDrynessLevel() - : ReadAttribute("selected-dryness-level") + ReadLaundryWasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadLaundryDryerControlsSelectedDrynessLevel() + ~ReadLaundryWasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedDrynessLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("LaundryWasherMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeCurrentMode() + : SubscribeAttribute("current-mode") + { + } + + ~SubscribeAttributeLaundryWasherModeCurrentMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCurrentModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute StartUpMode + */ +class ReadLaundryWasherModeStartUpMode : public ReadAttribute { +public: + ReadLaundryWasherModeStartUpMode() + : ReadAttribute("start-up-mode") + { + } + + ~ReadLaundryWasherModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("LaundryWasherMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteLaundryWasherModeStartUpMode : public WriteAttribute { +public: + WriteLaundryWasherModeStartUpMode() + : WriteAttribute("start-up-mode") + { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteLaundryWasherModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeLaundryWasherModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStartUpModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute OnMode + */ +class ReadLaundryWasherModeOnMode : public ReadAttribute { +public: + ReadLaundryWasherModeOnMode() + : ReadAttribute("on-mode") + { + } + + ~ReadLaundryWasherModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); + LogNSError("LaundryWasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54129,28 +54487,28 @@ class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { } }; -class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { +class WriteLaundryWasherModeOnMode : public WriteAttribute { public: - WriteLaundryDryerControlsSelectedDrynessLevel() - : WriteAttribute("selected-dryness-level") + WriteLaundryWasherModeOnMode() + : WriteAttribute("on-mode") { - AddArgument("attr-name", "selected-dryness-level"); + AddArgument("attr-name", "on-mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteLaundryDryerControlsSelectedDrynessLevel() + ~WriteLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -54159,9 +54517,9 @@ class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); + LogNSError("LaundryWasherMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54173,25 +54531,25 @@ class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() - : SubscribeAttribute("selected-dryness-level") + SubscribeAttributeLaundryWasherModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + ~SubscribeAttributeLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54202,10 +54560,10 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedDrynessLevelWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54224,32 +54582,32 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr /* * Attribute GeneratedCommandList */ -class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsGeneratedCommandList() + ReadLaundryWasherModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryDryerControlsGeneratedCommandList() + ~ReadLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); + LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54258,25 +54616,25 @@ class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + SubscribeAttributeLaundryWasherModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54290,7 +54648,7 @@ class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public Subscr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54309,32 +54667,32 @@ class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public Subscr /* * Attribute AcceptedCommandList */ -class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsAcceptedCommandList() + ReadLaundryWasherModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryDryerControlsAcceptedCommandList() + ~ReadLaundryWasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); + LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54343,25 +54701,25 @@ class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + SubscribeAttributeLaundryWasherModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54375,7 +54733,7 @@ class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public Subscri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54394,32 +54752,32 @@ class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public Subscri /* * Attribute EventList */ -class ReadLaundryDryerControlsEventList : public ReadAttribute { +class ReadLaundryWasherModeEventList : public ReadAttribute { public: - ReadLaundryDryerControlsEventList() + ReadLaundryWasherModeEventList() : ReadAttribute("event-list") { } - ~ReadLaundryDryerControlsEventList() + ~ReadLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls EventList read Error", error); + LogNSError("LaundryWasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54428,25 +54786,25 @@ class ReadLaundryDryerControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsEventList() + SubscribeAttributeLaundryWasherModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryDryerControlsEventList() + ~SubscribeAttributeLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54460,7 +54818,7 @@ class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribut [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54479,32 +54837,32 @@ class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribut /* * Attribute AttributeList */ -class ReadLaundryDryerControlsAttributeList : public ReadAttribute { +class ReadLaundryWasherModeAttributeList : public ReadAttribute { public: - ReadLaundryDryerControlsAttributeList() + ReadLaundryWasherModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryDryerControlsAttributeList() + ~ReadLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AttributeList read Error", error); + LogNSError("LaundryWasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54513,25 +54871,25 @@ class ReadLaundryDryerControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsAttributeList() + SubscribeAttributeLaundryWasherModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryDryerControlsAttributeList() + ~SubscribeAttributeLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54545,7 +54903,7 @@ class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttr [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54564,32 +54922,32 @@ class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttr /* * Attribute FeatureMap */ -class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { +class ReadLaundryWasherModeFeatureMap : public ReadAttribute { public: - ReadLaundryDryerControlsFeatureMap() + ReadLaundryWasherModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryDryerControlsFeatureMap() + ~ReadLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls FeatureMap read Error", error); + LogNSError("LaundryWasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54598,25 +54956,25 @@ class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsFeatureMap() + SubscribeAttributeLaundryWasherModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryDryerControlsFeatureMap() + ~SubscribeAttributeLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54630,7 +54988,7 @@ class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribu [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54649,32 +55007,32 @@ class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribu /* * Attribute ClusterRevision */ -class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { +class ReadLaundryWasherModeClusterRevision : public ReadAttribute { public: - ReadLaundryDryerControlsClusterRevision() + ReadLaundryWasherModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryDryerControlsClusterRevision() + ~ReadLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls ClusterRevision read Error", error); + LogNSError("LaundryWasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54683,25 +55041,25 @@ class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsClusterRevision() + SubscribeAttributeLaundryWasherModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryDryerControlsClusterRevision() + ~SubscribeAttributeLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54715,7 +55073,7 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54730,19 +55088,18 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -54753,40 +55110,51 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class ModeSelectChangeToMode : public ClusterCommand { +class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { public: - ModeSelectChangeToMode() + RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(NSError * _Nullable error) { + ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -54797,202 +55165,42 @@ class ModeSelectChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; - -/* - * Attribute Description - */ -class ReadModeSelectDescription : public ReadAttribute { -public: - ReadModeSelectDescription() - : ReadAttribute("description") - { - } - - ~ReadModeSelectDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ModeSelect Description read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { -public: - SubscribeAttributeModeSelectDescription() - : SubscribeAttribute("description") - { - } - - ~SubscribeAttributeModeSelectDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDescriptionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute StandardNamespace - */ -class ReadModeSelectStandardNamespace : public ReadAttribute { -public: - ReadModeSelectStandardNamespace() - : ReadAttribute("standard-namespace") - { - } - - ~ReadModeSelectStandardNamespace() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ModeSelect StandardNamespace read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; }; -class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { -public: - SubscribeAttributeModeSelectStandardNamespace() - : SubscribeAttribute("standard-namespace") - { - } - - ~SubscribeAttributeModeSelectStandardNamespace() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStandardNamespaceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; +#endif // MTR_ENABLE_PROVISIONAL - return CHIP_NO_ERROR; - } -}; +#if MTR_ENABLE_PROVISIONAL /* * Attribute SupportedModes */ -class ReadModeSelectSupportedModes : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { public: - ReadModeSelectSupportedModes() + ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadModeSelectSupportedModes() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect SupportedModes read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55001,25 +55209,25 @@ class ReadModeSelectSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeModeSelectSupportedModes() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeModeSelectSupportedModes() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55033,7 +55241,7 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55046,35 +55254,38 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute CurrentMode */ -class ReadModeSelectCurrentMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { public: - ReadModeSelectCurrentMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadModeSelectCurrentMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect CurrentMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55083,25 +55294,25 @@ class ReadModeSelectCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectCurrentMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeModeSelectCurrentMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55115,7 +55326,7 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55128,35 +55339,38 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute StartUpMode */ -class ReadModeSelectStartUpMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { public: - ReadModeSelectStartUpMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadModeSelectStartUpMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect StartUpMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55165,9 +55379,9 @@ class ReadModeSelectStartUpMode : public ReadAttribute { } }; -class WriteModeSelectStartUpMode : public WriteAttribute { +class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { public: - WriteModeSelectStartUpMode() + WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -55175,18 +55389,18 @@ class WriteModeSelectStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteModeSelectStartUpMode() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -55197,7 +55411,7 @@ class WriteModeSelectStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55209,25 +55423,25 @@ class WriteModeSelectStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStartUpMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeModeSelectStartUpMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55241,7 +55455,7 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55254,35 +55468,38 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute OnMode */ -class ReadModeSelectOnMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { public: - ReadModeSelectOnMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() : ReadAttribute("on-mode") { } - ~ReadModeSelectOnMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect OnMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55291,9 +55508,9 @@ class ReadModeSelectOnMode : public ReadAttribute { } }; -class WriteModeSelectOnMode : public WriteAttribute { +class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { public: - WriteModeSelectOnMode() + WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -55301,18 +55518,18 @@ class WriteModeSelectOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteModeSelectOnMode() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -55323,7 +55540,7 @@ class WriteModeSelectOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55335,25 +55552,25 @@ class WriteModeSelectOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectOnMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeModeSelectOnMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55367,7 +55584,7 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55380,35 +55597,38 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadModeSelectGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { public: - ReadModeSelectGeneratedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadModeSelectGeneratedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55417,25 +55637,25 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectGeneratedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeModeSelectGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55449,7 +55669,7 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55462,35 +55682,38 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadModeSelectAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { public: - ReadModeSelectAcceptedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadModeSelectAcceptedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55499,25 +55722,25 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAcceptedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeModeSelectAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55531,7 +55754,7 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55544,37 +55767,38 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadModeSelectEventList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { public: - ReadModeSelectEventList() + ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() : ReadAttribute("event-list") { } - ~ReadModeSelectEventList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect EventList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55583,25 +55807,25 @@ class ReadModeSelectEventList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectEventList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeModeSelectEventList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55615,7 +55839,7 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55629,36 +55853,37 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadModeSelectAttributeList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { public: - ReadModeSelectAttributeList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadModeSelectAttributeList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AttributeList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55667,25 +55892,25 @@ class ReadModeSelectAttributeList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAttributeList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectAttributeList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55699,7 +55924,7 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55712,35 +55937,38 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadModeSelectFeatureMap : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { public: - ReadModeSelectFeatureMap() + ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadModeSelectFeatureMap() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect FeatureMap read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55749,25 +55977,25 @@ class ReadModeSelectFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectFeatureMap() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectFeatureMap() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55781,7 +56009,7 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55794,35 +56022,38 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadModeSelectClusterRevision : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { public: - ReadModeSelectClusterRevision() + ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadModeSelectClusterRevision() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect ClusterRevision read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55831,25 +56062,25 @@ class ReadModeSelectClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectClusterRevision() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectClusterRevision() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55863,7 +56094,7 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55876,18 +56107,19 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherMode | 0x0051 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -55898,97 +56130,37 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL -/* - * Command ChangeToMode - */ -class LaundryWasherModeChangeToMode : public ClusterCommand { -public: - LaundryWasherModeChangeToMode() - : ClusterCommand("change-to-mode") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute SpinSpeeds */ -class ReadLaundryWasherModeSupportedModes : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { public: - ReadLaundryWasherModeSupportedModes() - : ReadAttribute("supported-modes") + ReadLaundryWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") { } - ~ReadLaundryWasherModeSupportedModes() + ~ReadLaundryWasherControlsSpinSpeeds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode SupportedModes read Error", error); + LogNSError("LaundryWasherControls SpinSpeeds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55997,25 +56169,25 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeLaundryWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") { } - ~SubscribeAttributeLaundryWasherModeSupportedModes() + ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56026,10 +56198,10 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeSpinSpeedsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56046,34 +56218,34 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute SpinSpeedCurrent */ -class ReadLaundryWasherModeCurrentMode : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { public: - ReadLaundryWasherModeCurrentMode() - : ReadAttribute("current-mode") + ReadLaundryWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") { } - ~ReadLaundryWasherModeCurrentMode() + ~ReadLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode CurrentMode read Error", error); + LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56082,25 +56254,69 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { +class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { public: - SubscribeAttributeLaundryWasherModeCurrentMode() - : SubscribeAttribute("current-mode") + WriteLaundryWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryWasherModeCurrentMode() + ~WriteLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") + { + } + + ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56111,10 +56327,10 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSpinSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56131,34 +56347,34 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute StartUpMode + * Attribute NumberOfRinses */ -class ReadLaundryWasherModeStartUpMode : public ReadAttribute { +class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { public: - ReadLaundryWasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadLaundryWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") { } - ~ReadLaundryWasherModeStartUpMode() + ~ReadLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode StartUpMode read Error", error); + LogNSError("LaundryWasherControls NumberOfRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56167,39 +56383,36 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { } }; -class WriteLaundryWasherModeStartUpMode : public WriteAttribute { +class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { public: - WriteLaundryWasherModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteLaundryWasherControlsNumberOfRinses() + : WriteAttribute("number-of-rinses") { - AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-name", "number-of-rinses"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteLaundryWasherModeStartUpMode() + ~WriteLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode write Error", error); + LogNSError("LaundryWasherControls NumberOfRinses write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56208,28 +56421,28 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeLaundryWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") { } - ~SubscribeAttributeLaundryWasherModeStartUpMode() + ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56240,10 +56453,10 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeNumberOfRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56260,105 +56473,61 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute SupportedRinses */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { +class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { public: - ReadLaundryWasherModeOnMode() - : ReadAttribute("on-mode") + ReadLaundryWasherControlsSupportedRinses() + : ReadAttribute("supported-rinses") { } - ~ReadLaundryWasherModeOnMode() + ~ReadLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeOnMode : public WriteAttribute { -public: - WriteLaundryWasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); + LogNSError("LaundryWasherControls SupportedRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeLaundryWasherControlsSupportedRinses() + : SubscribeAttribute("supported-rinses") { } - ~SubscribeAttributeLaundryWasherModeOnMode() + ~SubscribeAttributeLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56369,10 +56538,10 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeSupportedRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56391,32 +56560,32 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeGeneratedCommandList() + ReadLaundryWasherControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherModeGeneratedCommandList() + ~ReadLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56425,25 +56594,25 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeGeneratedCommandList() + SubscribeAttributeLaundryWasherControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() + ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56457,7 +56626,7 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56476,32 +56645,32 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeAcceptedCommandList() + ReadLaundryWasherControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherModeAcceptedCommandList() + ~ReadLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56510,25 +56679,25 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAcceptedCommandList() + SubscribeAttributeLaundryWasherControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() + ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56542,7 +56711,7 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56561,32 +56730,32 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA /* * Attribute EventList */ -class ReadLaundryWasherModeEventList : public ReadAttribute { +class ReadLaundryWasherControlsEventList : public ReadAttribute { public: - ReadLaundryWasherModeEventList() + ReadLaundryWasherControlsEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherModeEventList() + ~ReadLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode EventList read Error", error); + LogNSError("LaundryWasherControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56595,25 +56764,25 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeEventList() + SubscribeAttributeLaundryWasherControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherModeEventList() + ~SubscribeAttributeLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56627,7 +56796,7 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56646,32 +56815,32 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadLaundryWasherModeAttributeList : public ReadAttribute { +class ReadLaundryWasherControlsAttributeList : public ReadAttribute { public: - ReadLaundryWasherModeAttributeList() + ReadLaundryWasherControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherModeAttributeList() + ~ReadLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AttributeList read Error", error); + LogNSError("LaundryWasherControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56680,25 +56849,25 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAttributeList() + SubscribeAttributeLaundryWasherControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherModeAttributeList() + ~SubscribeAttributeLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56712,7 +56881,7 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56731,32 +56900,32 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu /* * Attribute FeatureMap */ -class ReadLaundryWasherModeFeatureMap : public ReadAttribute { +class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { public: - ReadLaundryWasherModeFeatureMap() + ReadLaundryWasherControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherModeFeatureMap() + ~ReadLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode FeatureMap read Error", error); + LogNSError("LaundryWasherControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56765,25 +56934,25 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeFeatureMap() + SubscribeAttributeLaundryWasherControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherModeFeatureMap() + ~SubscribeAttributeLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56797,7 +56966,7 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56816,32 +56985,32 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadLaundryWasherModeClusterRevision : public ReadAttribute { +class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { public: - ReadLaundryWasherModeClusterRevision() + ReadLaundryWasherControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherModeClusterRevision() + ~ReadLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode ClusterRevision read Error", error); + LogNSError("LaundryWasherControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56850,25 +57019,25 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeClusterRevision() + SubscribeAttributeLaundryWasherControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherModeClusterRevision() + ~SubscribeAttributeLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56882,7 +57051,7 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56897,9 +57066,8 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster RvcRunMode | 0x0054 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -56907,7 +57075,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -56919,50 +57086,45 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { +class RvcRunModeChangeToMode : public ClusterCommand { public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() + RvcRunModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -56974,42 +57136,38 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust } private: - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { +class ReadRvcRunModeSupportedModes : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ReadRvcRunModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~ReadRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + LogNSError("RVCRunMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57018,25 +57176,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + SubscribeAttributeRvcRunModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~SubscribeAttributeRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57050,7 +57208,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57063,38 +57221,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { +class ReadRvcRunModeCurrentMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ReadRvcRunModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~ReadRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); + LogNSError("RVCRunMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57103,25 +57258,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + SubscribeAttributeRvcRunModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~SubscribeAttributeRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57135,136 +57290,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute StartUpMode - */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { -public: - ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57277,38 +57303,37 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute OnMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { +class ReadRvcRunModeOnMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ReadRvcRunModeOnMode() : ReadAttribute("on-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~ReadRvcRunModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); + LogNSError("RVCRunMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57317,9 +57342,9 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAtt } }; -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { +class WriteRvcRunModeOnMode : public WriteAttribute { public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + WriteRvcRunModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -57327,18 +57352,18 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA WriteAttribute::AddArguments(); } - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~WriteRvcRunModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -57349,7 +57374,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + LogNSError("RVCRunMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57361,25 +57386,25 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + SubscribeAttributeRvcRunModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~SubscribeAttributeRvcRunModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57393,7 +57418,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57407,37 +57432,36 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { +class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ReadRvcRunModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~ReadRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + LogNSError("RVCRunMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57446,25 +57470,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + SubscribeAttributeRvcRunModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~SubscribeAttributeRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57478,7 +57502,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57491,38 +57515,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { +class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ReadRvcRunModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~ReadRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + LogNSError("RVCRunMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57531,25 +57552,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + SubscribeAttributeRvcRunModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~SubscribeAttributeRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57563,7 +57584,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57576,38 +57597,37 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { +class ReadRvcRunModeEventList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ReadRvcRunModeEventList() : ReadAttribute("event-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~ReadRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + LogNSError("RVCRunMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57616,25 +57636,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + SubscribeAttributeRvcRunModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~SubscribeAttributeRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57648,7 +57668,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57662,37 +57682,36 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { +class ReadRvcRunModeAttributeList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ReadRvcRunModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~ReadRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + LogNSError("RVCRunMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57701,25 +57720,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + SubscribeAttributeRvcRunModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~SubscribeAttributeRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57733,7 +57752,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57746,38 +57765,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { +class ReadRvcRunModeFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ReadRvcRunModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~ReadRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); + LogNSError("RVCRunMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57786,25 +57802,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + SubscribeAttributeRvcRunModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~SubscribeAttributeRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57818,7 +57834,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57831,38 +57847,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { +class ReadRvcRunModeClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ReadRvcRunModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~ReadRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + LogNSError("RVCRunMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57871,25 +57884,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + SubscribeAttributeRvcRunModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~SubscribeAttributeRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57903,7 +57916,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57916,19 +57929,16 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherControls | 0x0053 | +| Cluster RvcCleanMode | 0x0055 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * SupportedRinses | 0x0003 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -57939,193 +57949,115 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpinSpeeds + * Command ChangeToMode */ -class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { +class RvcCleanModeChangeToMode : public ClusterCommand { public: - ReadLaundryWasherControlsSpinSpeeds() - : ReadAttribute("spin-speeds") - { - } - - ~ReadLaundryWasherControlsSpinSpeeds() + RvcCleanModeChangeToMode() + : ClusterCommand("change-to-mode") { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("LaundryWasherControls SpinSpeeds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { -public: - SubscribeAttributeLaundryWasherControlsSpinSpeeds() - : SubscribeAttribute("spin-speeds") - { - } - - ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSpinSpeedsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; +}; /* - * Attribute SpinSpeedCurrent + * Attribute SupportedModes */ -class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { +class ReadRvcCleanModeSupportedModes : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeedCurrent() - : ReadAttribute("spin-speed-current") + ReadRvcCleanModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadLaundryWasherControlsSpinSpeedCurrent() + ~ReadRvcCleanModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { -public: - WriteLaundryWasherControlsSpinSpeedCurrent() - : WriteAttribute("spin-speed-current") - { - AddArgument("attr-name", "spin-speed-current"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherControlsSpinSpeedCurrent() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + LogNSError("RVCCleanMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() - : SubscribeAttribute("spin-speed-current") + SubscribeAttributeRvcCleanModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeRvcCleanModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58136,10 +58068,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedCurrentWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58152,106 +58084,62 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NumberOfRinses + * Attribute CurrentMode */ -class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { +class ReadRvcCleanModeCurrentMode : public ReadAttribute { public: - ReadLaundryWasherControlsNumberOfRinses() - : ReadAttribute("number-of-rinses") + ReadRvcCleanModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadLaundryWasherControlsNumberOfRinses() + ~ReadRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls NumberOfRinses read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { -public: - WriteLaundryWasherControlsNumberOfRinses() - : WriteAttribute("number-of-rinses") - { - AddArgument("attr-name", "number-of-rinses"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherControlsNumberOfRinses() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + LogNSError("RVCCleanMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsNumberOfRinses() - : SubscribeAttribute("number-of-rinses") + SubscribeAttributeRvcCleanModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() + ~SubscribeAttributeRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58262,10 +58150,10 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRinsesWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58278,38 +58166,37 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedRinses + * Attribute OnMode */ -class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { +class ReadRvcCleanModeOnMode : public ReadAttribute { public: - ReadLaundryWasherControlsSupportedRinses() - : ReadAttribute("supported-rinses") + ReadRvcCleanModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadLaundryWasherControlsSupportedRinses() + ~ReadRvcCleanModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SupportedRinses read Error", error); + LogNSError("RVCCleanMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58318,25 +58205,69 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { +class WriteRvcCleanModeOnMode : public WriteAttribute { public: - SubscribeAttributeLaundryWasherControlsSupportedRinses() - : SubscribeAttribute("supported-rinses") + WriteRvcCleanModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryWasherControlsSupportedRinses() + ~WriteRvcCleanModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("RVCCleanMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeRvcCleanModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeRvcCleanModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58347,10 +58278,10 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedRinsesWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58364,37 +58295,36 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { +class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsGeneratedCommandList() + ReadRvcCleanModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherControlsGeneratedCommandList() + ~ReadRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + LogNSError("RVCCleanMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58403,25 +58333,25 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + SubscribeAttributeRvcCleanModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + ~SubscribeAttributeRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58435,7 +58365,7 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58448,38 +58378,35 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { +class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsAcceptedCommandList() + ReadRvcCleanModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherControlsAcceptedCommandList() + ~ReadRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + LogNSError("RVCCleanMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58488,25 +58415,25 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + SubscribeAttributeRvcCleanModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + ~SubscribeAttributeRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58520,7 +58447,7 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58533,38 +58460,37 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadLaundryWasherControlsEventList : public ReadAttribute { +class ReadRvcCleanModeEventList : public ReadAttribute { public: - ReadLaundryWasherControlsEventList() + ReadRvcCleanModeEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherControlsEventList() + ~ReadRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls EventList read Error", error); + LogNSError("RVCCleanMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58573,25 +58499,25 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsEventList() + SubscribeAttributeRvcCleanModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherControlsEventList() + ~SubscribeAttributeRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58605,7 +58531,7 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58619,37 +58545,36 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadLaundryWasherControlsAttributeList : public ReadAttribute { +class ReadRvcCleanModeAttributeList : public ReadAttribute { public: - ReadLaundryWasherControlsAttributeList() + ReadRvcCleanModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherControlsAttributeList() + ~ReadRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AttributeList read Error", error); + LogNSError("RVCCleanMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58658,25 +58583,25 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAttributeList() + SubscribeAttributeRvcCleanModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherControlsAttributeList() + ~SubscribeAttributeRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58690,7 +58615,7 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58703,38 +58628,35 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { +class ReadRvcCleanModeFeatureMap : public ReadAttribute { public: - ReadLaundryWasherControlsFeatureMap() + ReadRvcCleanModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherControlsFeatureMap() + ~ReadRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls FeatureMap read Error", error); + LogNSError("RVCCleanMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58743,25 +58665,25 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsFeatureMap() + SubscribeAttributeRvcCleanModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherControlsFeatureMap() + ~SubscribeAttributeRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58775,7 +58697,7 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58788,38 +58710,35 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { +class ReadRvcCleanModeClusterRevision : public ReadAttribute { public: - ReadLaundryWasherControlsClusterRevision() + ReadRvcCleanModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherControlsClusterRevision() + ~ReadRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls ClusterRevision read Error", error); + LogNSError("RVCCleanMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58828,25 +58747,25 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsClusterRevision() + SubscribeAttributeRvcCleanModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherControlsClusterRevision() + ~SubscribeAttributeRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58860,7 +58779,7 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58873,18 +58792,20 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcRunMode | 0x0054 | +| Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -58895,88 +58816,105 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeToMode + * Command SetTemperature */ -class RvcRunModeChangeToMode : public ClusterCommand { +class TemperatureControlSetTemperature : public ClusterCommand { public: - RvcRunModeChangeToMode() - : ClusterCommand("change-to-mode") + TemperatureControlSetTemperature() + : ClusterCommand("set-temperature") { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperature.HasValue()) { + params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; + } else { + params.targetTemperature = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperatureLevel.HasValue()) { + params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; + } else { + params.targetTemperatureLevel = nil; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setTemperatureWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedModes + * Attribute TemperatureSetpoint */ -class ReadRvcRunModeSupportedModes : public ReadAttribute { +class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { public: - ReadRvcRunModeSupportedModes() - : ReadAttribute("supported-modes") + ReadTemperatureControlTemperatureSetpoint() + : ReadAttribute("temperature-setpoint") { } - ~ReadRvcRunModeSupportedModes() + ~ReadTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode SupportedModes read Error", error); + LogNSError("TemperatureControl TemperatureSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58985,25 +58923,25 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeTemperatureControlTemperatureSetpoint() + : SubscribeAttribute("temperature-setpoint") { } - ~SubscribeAttributeRvcRunModeSupportedModes() + ~SubscribeAttributeTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59014,10 +58952,10 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeTemperatureSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59030,35 +58968,38 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMode + * Attribute MinTemperature */ -class ReadRvcRunModeCurrentMode : public ReadAttribute { +class ReadTemperatureControlMinTemperature : public ReadAttribute { public: - ReadRvcRunModeCurrentMode() - : ReadAttribute("current-mode") + ReadTemperatureControlMinTemperature() + : ReadAttribute("min-temperature") { } - ~ReadRvcRunModeCurrentMode() + ~ReadTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode CurrentMode read Error", error); + LogNSError("TemperatureControl MinTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59067,25 +59008,25 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeTemperatureControlMinTemperature() + : SubscribeAttribute("min-temperature") { } - ~SubscribeAttributeRvcRunModeCurrentMode() + ~SubscribeAttributeTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59096,10 +59037,10 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeMinTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59112,37 +59053,38 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute MaxTemperature */ -class ReadRvcRunModeOnMode : public ReadAttribute { +class ReadTemperatureControlMaxTemperature : public ReadAttribute { public: - ReadRvcRunModeOnMode() - : ReadAttribute("on-mode") + ReadTemperatureControlMaxTemperature() + : ReadAttribute("max-temperature") { } - ~ReadRvcRunModeOnMode() + ~ReadTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode OnMode read Error", error); + LogNSError("TemperatureControl MaxTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59151,69 +59093,195 @@ class ReadRvcRunModeOnMode : public ReadAttribute { } }; -class WriteRvcRunModeOnMode : public WriteAttribute { +class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { public: - WriteRvcRunModeOnMode() - : WriteAttribute("on-mode") + SubscribeAttributeTemperatureControlMaxTemperature() + : SubscribeAttribute("max-temperature") { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteRvcRunModeOnMode() + ~SubscribeAttributeTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxTemperatureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RVCRunMode OnMode write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute Step + */ +class ReadTemperatureControlStep : public ReadAttribute { +public: + ReadTemperatureControlStep() + : ReadAttribute("step") + { + } + + ~ReadTemperatureControlStep() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TemperatureControl Step read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::DataModel::Nullable mValue; +class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlStep() + : SubscribeAttribute("step") + { + } + + ~SubscribeAttributeTemperatureControlStep() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStepWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SelectedTemperatureLevel + */ +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { public: - SubscribeAttributeRvcRunModeOnMode() - : SubscribeAttribute("on-mode") + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") { } - ~SubscribeAttributeRvcRunModeOnMode() + ~ReadTemperatureControlSelectedTemperatureLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") + { + } + + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59224,10 +59292,95 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.OnMode response %@", [value description]); + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedTemperatureLevels + */ +class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { +public: + ReadTemperatureControlSupportedTemperatureLevels() + : ReadAttribute("supported-temperature-levels") + { + } + + ~ReadTemperatureControlSupportedTemperatureLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { +public: + SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + : SubscribeAttribute("supported-temperature-levels") + { + } + + ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59241,36 +59394,37 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { +class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { public: - ReadRvcRunModeGeneratedCommandList() + ReadTemperatureControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcRunModeGeneratedCommandList() + ~ReadTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode GeneratedCommandList read Error", error); + LogNSError("TemperatureControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59279,25 +59433,25 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeGeneratedCommandList() + SubscribeAttributeTemperatureControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcRunModeGeneratedCommandList() + ~SubscribeAttributeTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59311,7 +59465,7 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59324,35 +59478,38 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { +class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { public: - ReadRvcRunModeAcceptedCommandList() + ReadTemperatureControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcRunModeAcceptedCommandList() + ~ReadTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AcceptedCommandList read Error", error); + LogNSError("TemperatureControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59361,25 +59518,25 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAcceptedCommandList() + SubscribeAttributeTemperatureControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcRunModeAcceptedCommandList() + ~SubscribeAttributeTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59393,7 +59550,7 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59406,37 +59563,38 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcRunModeEventList : public ReadAttribute { +class ReadTemperatureControlEventList : public ReadAttribute { public: - ReadRvcRunModeEventList() + ReadTemperatureControlEventList() : ReadAttribute("event-list") { } - ~ReadRvcRunModeEventList() + ~ReadTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode EventList read Error", error); + LogNSError("TemperatureControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59445,25 +59603,25 @@ class ReadRvcRunModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeEventList() + SubscribeAttributeTemperatureControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcRunModeEventList() + ~SubscribeAttributeTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59477,7 +59635,7 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59491,36 +59649,37 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcRunModeAttributeList : public ReadAttribute { +class ReadTemperatureControlAttributeList : public ReadAttribute { public: - ReadRvcRunModeAttributeList() + ReadTemperatureControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcRunModeAttributeList() + ~ReadTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AttributeList read Error", error); + LogNSError("TemperatureControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59529,25 +59688,25 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAttributeList() + SubscribeAttributeTemperatureControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcRunModeAttributeList() + ~SubscribeAttributeTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59561,7 +59720,7 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59574,35 +59733,38 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcRunModeFeatureMap : public ReadAttribute { +class ReadTemperatureControlFeatureMap : public ReadAttribute { public: - ReadRvcRunModeFeatureMap() + ReadTemperatureControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcRunModeFeatureMap() + ~ReadTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode FeatureMap read Error", error); + LogNSError("TemperatureControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59611,25 +59773,25 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeFeatureMap() + SubscribeAttributeTemperatureControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcRunModeFeatureMap() + ~SubscribeAttributeTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59643,7 +59805,7 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59656,35 +59818,38 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcRunModeClusterRevision : public ReadAttribute { +class ReadTemperatureControlClusterRevision : public ReadAttribute { public: - ReadRvcRunModeClusterRevision() + ReadTemperatureControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcRunModeClusterRevision() + ~ReadTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode ClusterRevision read Error", error); + LogNSError("TemperatureControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59693,25 +59858,25 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeClusterRevision() + SubscribeAttributeTemperatureControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcRunModeClusterRevision() + ~SubscribeAttributeTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59725,7 +59890,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59738,108 +59903,60 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcCleanMode | 0x0055 | +| Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * OnMode | 0x0003 | +| * Mask | 0x0000 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class RvcCleanModeChangeToMode : public ClusterCommand { -public: - RvcCleanModeChangeToMode() - : ClusterCommand("change-to-mode") - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Notify | 0x0000 | +\*----------------------------------------------------------------------------*/ -private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute Mask */ -class ReadRvcCleanModeSupportedModes : public ReadAttribute { +class ReadRefrigeratorAlarmMask : public ReadAttribute { public: - ReadRvcCleanModeSupportedModes() - : ReadAttribute("supported-modes") + ReadRefrigeratorAlarmMask() + : ReadAttribute("mask") { } - ~ReadRvcCleanModeSupportedModes() + ~ReadRefrigeratorAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode SupportedModes read Error", error); + LogNSError("RefrigeratorAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59848,25 +59965,25 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeRefrigeratorAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeRvcCleanModeSupportedModes() + ~SubscribeAttributeRefrigeratorAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59877,10 +59994,10 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59893,35 +60010,38 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMode + * Attribute State */ -class ReadRvcCleanModeCurrentMode : public ReadAttribute { +class ReadRefrigeratorAlarmState : public ReadAttribute { public: - ReadRvcCleanModeCurrentMode() - : ReadAttribute("current-mode") + ReadRefrigeratorAlarmState() + : ReadAttribute("state") { } - ~ReadRvcCleanModeCurrentMode() + ~ReadRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode CurrentMode read Error", error); + LogNSError("RefrigeratorAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59930,25 +60050,25 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeRefrigeratorAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeRvcCleanModeCurrentMode() + ~SubscribeAttributeRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59959,10 +60079,10 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59975,108 +60095,65 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute Supported */ -class ReadRvcCleanModeOnMode : public ReadAttribute { +class ReadRefrigeratorAlarmSupported : public ReadAttribute { public: - ReadRvcCleanModeOnMode() - : ReadAttribute("on-mode") + ReadRefrigeratorAlarmSupported() + : ReadAttribute("supported") { } - ~ReadRvcCleanModeOnMode() + ~ReadRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRvcCleanModeOnMode : public WriteAttribute { -public: - WriteRvcCleanModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRvcCleanModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RVCCleanMode OnMode write Error", error); + LogNSError("RefrigeratorAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeRefrigeratorAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeRvcCleanModeOnMode() + ~SubscribeAttributeRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60087,10 +60164,10 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60104,36 +60181,37 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { public: - ReadRvcCleanModeGeneratedCommandList() + ReadRefrigeratorAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcCleanModeGeneratedCommandList() + ~ReadRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60142,25 +60220,25 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeGeneratedCommandList() + SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcCleanModeGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60174,7 +60252,7 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60187,35 +60265,38 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { public: - ReadRvcCleanModeAcceptedCommandList() + ReadRefrigeratorAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcCleanModeAcceptedCommandList() + ~ReadRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60224,25 +60305,25 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAcceptedCommandList() + SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcCleanModeAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60256,7 +60337,7 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60269,37 +60350,38 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcCleanModeEventList : public ReadAttribute { +class ReadRefrigeratorAlarmEventList : public ReadAttribute { public: - ReadRvcCleanModeEventList() + ReadRefrigeratorAlarmEventList() : ReadAttribute("event-list") { } - ~ReadRvcCleanModeEventList() + ~ReadRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode EventList read Error", error); + LogNSError("RefrigeratorAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60308,25 +60390,25 @@ class ReadRvcCleanModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeEventList() + SubscribeAttributeRefrigeratorAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcCleanModeEventList() + ~SubscribeAttributeRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60340,7 +60422,7 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60354,36 +60436,37 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcCleanModeAttributeList : public ReadAttribute { +class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { public: - ReadRvcCleanModeAttributeList() + ReadRefrigeratorAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcCleanModeAttributeList() + ~ReadRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AttributeList read Error", error); + LogNSError("RefrigeratorAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60392,25 +60475,25 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAttributeList() + SubscribeAttributeRefrigeratorAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcCleanModeAttributeList() + ~SubscribeAttributeRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60424,7 +60507,7 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60437,35 +60520,38 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcCleanModeFeatureMap : public ReadAttribute { +class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { public: - ReadRvcCleanModeFeatureMap() + ReadRefrigeratorAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcCleanModeFeatureMap() + ~ReadRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode FeatureMap read Error", error); + LogNSError("RefrigeratorAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60474,25 +60560,25 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeFeatureMap() + SubscribeAttributeRefrigeratorAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcCleanModeFeatureMap() + ~SubscribeAttributeRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60506,7 +60592,7 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60519,35 +60605,38 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcCleanModeClusterRevision : public ReadAttribute { +class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { public: - ReadRvcCleanModeClusterRevision() + ReadRefrigeratorAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcCleanModeClusterRevision() + ~ReadRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode ClusterRevision read Error", error); + LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60556,25 +60645,25 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeClusterRevision() + SubscribeAttributeRefrigeratorAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcCleanModeClusterRevision() + ~SubscribeAttributeRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60588,7 +60677,7 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60601,20 +60690,20 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | +| Cluster DishwasherMode | 0x0059 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTemperature | 0x00 | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * SelectedTemperatureLevel | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -60627,68 +60716,60 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Command SetTemperature + * Command ChangeToMode */ -class TemperatureControlSetTemperature : public ClusterCommand { +class DishwasherModeChangeToMode : public ClusterCommand { public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") + DishwasherModeChangeToMode() + : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperature.HasValue()) { - params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; - } else { - params.targetTemperature = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperatureLevel.HasValue()) { - params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; - } else { - params.targetTemperatureLevel = nil; - } + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTemperatureWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster changeToModeWithParams:params completion: + ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -60696,34 +60777,34 @@ class TemperatureControlSetTemperature : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TemperatureSetpoint + * Attribute SupportedModes */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +class ReadDishwasherModeSupportedModes : public ReadAttribute { public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") + ReadDishwasherModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadTemperatureControlTemperatureSetpoint() + ~ReadDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + LogNSError("DishwasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60732,25 +60813,25 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + SubscribeAttributeDishwasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() + ~SubscribeAttributeDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60761,10 +60842,10 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60781,34 +60862,34 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinTemperature + * Attribute CurrentMode */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class ReadDishwasherModeCurrentMode : public ReadAttribute { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + ReadDishwasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadTemperatureControlMinTemperature() + ~ReadDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MinTemperature read Error", error); + LogNSError("DishwasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60817,25 +60898,25 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + SubscribeAttributeDishwasherModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeTemperatureControlMinTemperature() + ~SubscribeAttributeDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60846,10 +60927,10 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinTemperatureWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60866,34 +60947,34 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxTemperature + * Attribute StartUpMode */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { +class ReadDishwasherModeStartUpMode : public ReadAttribute { public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") + ReadDishwasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadTemperatureControlMaxTemperature() + ~ReadDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MaxTemperature read Error", error); + LogNSError("DishwasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60902,110 +60983,69 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +class WriteDishwasherModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + WriteDishwasherModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlMaxTemperature() + ~WriteDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeMaxTemperatureWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute Step - */ -class ReadTemperatureControlStep : public ReadAttribute { -public: - ReadTemperatureControlStep() - : ReadAttribute("step") - { - } - - ~ReadTemperatureControlStep() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl Step read Error", error); + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + SubscribeAttributeDishwasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeTemperatureControlStep() + ~SubscribeAttributeDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61016,10 +61056,10 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStepWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61036,34 +61076,34 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedTemperatureLevel + * Attribute OnMode */ -class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +class ReadDishwasherModeOnMode : public ReadAttribute { public: - ReadTemperatureControlSelectedTemperatureLevel() - : ReadAttribute("selected-temperature-level") + ReadDishwasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadTemperatureControlSelectedTemperatureLevel() + ~ReadDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + LogNSError("DishwasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61072,110 +61112,69 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +class WriteDishwasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeTemperatureControlSelectedTemperatureLevel() - : SubscribeAttribute("selected-temperature-level") + WriteDishwasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + ~WriteDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute SupportedTemperatureLevels - */ -class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { -public: - ReadTemperatureControlSupportedTemperatureLevels() - : ReadAttribute("supported-temperature-levels") - { - } - - ~ReadTemperatureControlSupportedTemperatureLevels() - { - } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - : SubscribeAttribute("supported-temperature-levels") + SubscribeAttributeDishwasherModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + ~SubscribeAttributeDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61186,10 +61185,10 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61208,32 +61207,32 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su /* * Attribute GeneratedCommandList */ -class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { +class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureControlGeneratedCommandList() + ReadDishwasherModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTemperatureControlGeneratedCommandList() + ~ReadDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl GeneratedCommandList read Error", error); + LogNSError("DishwasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61242,25 +61241,25 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlGeneratedCommandList() + SubscribeAttributeDishwasherModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureControlGeneratedCommandList() + ~SubscribeAttributeDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61274,7 +61273,7 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61293,32 +61292,32 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { +class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureControlAcceptedCommandList() + ReadDishwasherModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureControlAcceptedCommandList() + ~ReadDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AcceptedCommandList read Error", error); + LogNSError("DishwasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61327,25 +61326,25 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAcceptedCommandList() + SubscribeAttributeDishwasherModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureControlAcceptedCommandList() + ~SubscribeAttributeDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61359,7 +61358,7 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61378,202 +61377,32 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadTemperatureControlEventList : public ReadAttribute { -public: - ReadTemperatureControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadTemperatureControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeTemperatureControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadTemperatureControlAttributeList : public ReadAttribute { -public: - ReadTemperatureControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadTemperatureControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeTemperatureControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute FeatureMap - */ -class ReadTemperatureControlFeatureMap : public ReadAttribute { +class ReadDishwasherModeEventList : public ReadAttribute { public: - ReadTemperatureControlFeatureMap() - : ReadAttribute("feature-map") + ReadDishwasherModeEventList() + : ReadAttribute("event-list") { } - ~ReadTemperatureControlFeatureMap() + ~ReadDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl FeatureMap read Error", error); + LogNSError("DishwasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61582,25 +61411,25 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDishwasherModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureControlFeatureMap() + ~SubscribeAttributeDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61611,10 +61440,10 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61631,34 +61460,34 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadTemperatureControlClusterRevision : public ReadAttribute { +class ReadDishwasherModeAttributeList : public ReadAttribute { public: - ReadTemperatureControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadDishwasherModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTemperatureControlClusterRevision() + ~ReadDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl ClusterRevision read Error", error); + LogNSError("DishwasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61667,25 +61496,25 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDishwasherModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureControlClusterRevision() + ~SubscribeAttributeDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61696,10 +61525,10 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61713,59 +61542,37 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Notify | 0x0000 | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute FeatureMap */ -class ReadRefrigeratorAlarmMask : public ReadAttribute { +class ReadDishwasherModeFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAlarmMask() - : ReadAttribute("mask") + ReadDishwasherModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAlarmMask() + ~ReadDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm Mask read Error", error); + LogNSError("DishwasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61774,25 +61581,25 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeDishwasherModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAlarmMask() + ~SubscribeAttributeDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61803,10 +61610,10 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61823,34 +61630,34 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute ClusterRevision */ -class ReadRefrigeratorAlarmState : public ReadAttribute { +class ReadDishwasherModeClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAlarmState() - : ReadAttribute("state") + ReadDishwasherModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAlarmState() + ~ReadDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm State read Error", error); + LogNSError("DishwasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61859,25 +61666,25 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeDishwasherModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAlarmState() + ~SubscribeAttributeDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61888,10 +61695,10 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61905,37 +61712,56 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster AirQuality | 0x005B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AirQuality | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute AirQuality */ -class ReadRefrigeratorAlarmSupported : public ReadAttribute { +class ReadAirQualityAirQuality : public ReadAttribute { public: - ReadRefrigeratorAlarmSupported() - : ReadAttribute("supported") + ReadAirQualityAirQuality() + : ReadAttribute("air-quality") { } - ~ReadRefrigeratorAlarmSupported() + ~ReadAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm Supported read Error", error); + LogNSError("AirQuality AirQuality read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61944,25 +61770,25 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeAirQualityAirQuality() + : SubscribeAttribute("air-quality") { } - ~SubscribeAttributeRefrigeratorAlarmSupported() + ~SubscribeAttributeAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61973,10 +61799,10 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeAirQualityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61995,32 +61821,32 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { +class ReadAirQualityGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmGeneratedCommandList() + ReadAirQualityGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAlarmGeneratedCommandList() + ~ReadAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + LogNSError("AirQuality GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62029,25 +61855,25 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + SubscribeAttributeAirQualityGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + ~SubscribeAttributeAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62061,7 +61887,7 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62080,32 +61906,32 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe /* * Attribute AcceptedCommandList */ -class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { +class ReadAirQualityAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmAcceptedCommandList() + ReadAirQualityAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAlarmAcceptedCommandList() + ~ReadAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + LogNSError("AirQuality AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62114,25 +61940,25 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + SubscribeAttributeAirQualityAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + ~SubscribeAttributeAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62146,7 +61972,7 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62165,32 +61991,32 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA /* * Attribute EventList */ -class ReadRefrigeratorAlarmEventList : public ReadAttribute { +class ReadAirQualityEventList : public ReadAttribute { public: - ReadRefrigeratorAlarmEventList() + ReadAirQualityEventList() : ReadAttribute("event-list") { } - ~ReadRefrigeratorAlarmEventList() + ~ReadAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm EventList read Error", error); + LogNSError("AirQuality EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62199,25 +62025,25 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmEventList() + SubscribeAttributeAirQualityEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAlarmEventList() + ~SubscribeAttributeAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62231,7 +62057,7 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62250,32 +62076,32 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { +class ReadAirQualityAttributeList : public ReadAttribute { public: - ReadRefrigeratorAlarmAttributeList() + ReadAirQualityAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAlarmAttributeList() + ~ReadAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AttributeList read Error", error); + LogNSError("AirQuality AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62284,25 +62110,25 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAttributeList() + SubscribeAttributeAirQualityAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAlarmAttributeList() + ~SubscribeAttributeAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62316,7 +62142,7 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62335,32 +62161,32 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu /* * Attribute FeatureMap */ -class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { +class ReadAirQualityFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAlarmFeatureMap() + ReadAirQualityFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAlarmFeatureMap() + ~ReadAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + LogNSError("AirQuality FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62369,25 +62195,25 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmFeatureMap() + SubscribeAttributeAirQualityFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAlarmFeatureMap() + ~SubscribeAttributeAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62401,7 +62227,7 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62420,32 +62246,32 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { +class ReadAirQualityClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAlarmClusterRevision() + ReadAirQualityClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAlarmClusterRevision() + ~ReadAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + LogNSError("AirQuality ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62454,25 +62280,25 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmClusterRevision() + SubscribeAttributeAirQualityClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAlarmClusterRevision() + ~SubscribeAttributeAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62486,7 +62312,7 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62503,16 +62329,25 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DishwasherMode | 0x0059 | +| Cluster SmokeCoAlarm | 0x005C | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * SelfTestRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * ExpressedState | 0x0000 | +| * SmokeState | 0x0001 | +| * COState | 0x0002 | +| * BatteryAlert | 0x0003 | +| * DeviceMuted | 0x0004 | +| * TestInProgress | 0x0005 | +| * HardwareFaultAlert | 0x0006 | +| * EndOfServiceAlert | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * ContaminationState | 0x000A | +| * SmokeSensitivityLevel | 0x000B | +| * ExpiryDate | 0x000C | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -62521,64 +62356,62 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SmokeAlarm | 0x0000 | +| * COAlarm | 0x0001 | +| * LowBattery | 0x0002 | +| * HardwareFault | 0x0003 | +| * EndOfService | 0x0004 | +| * SelfTestComplete | 0x0005 | +| * AlarmMuted | 0x0006 | +| * MuteEnded | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * AllClear | 0x000A | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command ChangeToMode + * Command SelfTestRequest */ -class DishwasherModeChangeToMode : public ClusterCommand { +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - DishwasherModeChangeToMode() - : ClusterCommand("change-to-mode") + SmokeCoAlarmSelfTestRequest() + : ClusterCommand("self-test-request") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster selfTestRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -62586,34 +62419,34 @@ class DishwasherModeChangeToMode : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute ExpressedState */ -class ReadDishwasherModeSupportedModes : public ReadAttribute { +class ReadSmokeCoAlarmExpressedState : public ReadAttribute { public: - ReadDishwasherModeSupportedModes() - : ReadAttribute("supported-modes") + ReadSmokeCoAlarmExpressedState() + : ReadAttribute("expressed-state") { } - ~ReadDishwasherModeSupportedModes() + ~ReadSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode SupportedModes read Error", error); + LogNSError("SmokeCOAlarm ExpressedState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62622,25 +62455,25 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeSmokeCoAlarmExpressedState() + : SubscribeAttribute("expressed-state") { } - ~SubscribeAttributeDishwasherModeSupportedModes() + ~SubscribeAttributeSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62651,10 +62484,10 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeExpressedStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62671,34 +62504,34 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute SmokeState */ -class ReadDishwasherModeCurrentMode : public ReadAttribute { +class ReadSmokeCoAlarmSmokeState : public ReadAttribute { public: - ReadDishwasherModeCurrentMode() - : ReadAttribute("current-mode") + ReadSmokeCoAlarmSmokeState() + : ReadAttribute("smoke-state") { } - ~ReadDishwasherModeCurrentMode() + ~ReadSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode CurrentMode read Error", error); + LogNSError("SmokeCOAlarm SmokeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62707,25 +62540,25 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeSmokeCoAlarmSmokeState() + : SubscribeAttribute("smoke-state") { } - ~SubscribeAttributeDishwasherModeCurrentMode() + ~SubscribeAttributeSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62736,10 +62569,10 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSmokeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62756,34 +62589,34 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute StartUpMode + * Attribute COState */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { +class ReadSmokeCoAlarmCOState : public ReadAttribute { public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadSmokeCoAlarmCOState() + : ReadAttribute("costate") { } - ~ReadDishwasherModeStartUpMode() + ~ReadSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode StartUpMode read Error", error); + LogNSError("SmokeCOAlarm COState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62792,69 +62625,110 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { } }; -class WriteDishwasherModeStartUpMode : public WriteAttribute { +class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") + SubscribeAttributeSmokeCoAlarmCOState() + : SubscribeAttribute("costate") { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteDishwasherModeStartUpMode() + ~SubscribeAttributeSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeCOStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute BatteryAlert + */ +class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +public: + ReadSmokeCoAlarmBatteryAlert() + : ReadAttribute("battery-alert") + { + } + + ~ReadSmokeCoAlarmBatteryAlert() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm BatteryAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeSmokeCoAlarmBatteryAlert() + : SubscribeAttribute("battery-alert") { } - ~SubscribeAttributeDishwasherModeStartUpMode() + ~SubscribeAttributeSmokeCoAlarmBatteryAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62865,10 +62739,10 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeBatteryAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62885,34 +62759,34 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute DeviceMuted */ -class ReadDishwasherModeOnMode : public ReadAttribute { +class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") + ReadSmokeCoAlarmDeviceMuted() + : ReadAttribute("device-muted") { } - ~ReadDishwasherModeOnMode() + ~ReadSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode OnMode read Error", error); + LogNSError("SmokeCOAlarm DeviceMuted read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62921,69 +62795,110 @@ class ReadDishwasherModeOnMode : public ReadAttribute { } }; -class WriteDishwasherModeOnMode : public WriteAttribute { +class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") + SubscribeAttributeSmokeCoAlarmDeviceMuted() + : SubscribeAttribute("device-muted") { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteDishwasherModeOnMode() + ~SubscribeAttributeSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeDeviceMutedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute TestInProgress + */ +class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +public: + ReadSmokeCoAlarmTestInProgress() + : ReadAttribute("test-in-progress") + { + } + + ~ReadSmokeCoAlarmTestInProgress() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm TestInProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeSmokeCoAlarmTestInProgress() + : SubscribeAttribute("test-in-progress") { } - ~SubscribeAttributeDishwasherModeOnMode() + ~SubscribeAttributeSmokeCoAlarmTestInProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62994,10 +62909,10 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeTestInProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63014,34 +62929,34 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute HardwareFaultAlert */ -class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { public: - ReadDishwasherModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadSmokeCoAlarmHardwareFaultAlert() + : ReadAttribute("hardware-fault-alert") { } - ~ReadDishwasherModeGeneratedCommandList() + ~ReadSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63050,25 +62965,25 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + : SubscribeAttribute("hardware-fault-alert") { } - ~SubscribeAttributeDishwasherModeGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63079,10 +62994,10 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeHardwareFaultAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63099,34 +63014,34 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute EndOfServiceAlert */ -class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { public: - ReadDishwasherModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSmokeCoAlarmEndOfServiceAlert() + : ReadAttribute("end-of-service-alert") { } - ~ReadDishwasherModeAcceptedCommandList() + ~ReadSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63135,25 +63050,25 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + : SubscribeAttribute("end-of-service-alert") { } - ~SubscribeAttributeDishwasherModeAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63164,10 +63079,10 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEndOfServiceAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63184,34 +63099,34 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute InterconnectSmokeAlarm */ -class ReadDishwasherModeEventList : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { public: - ReadDishwasherModeEventList() - : ReadAttribute("event-list") + ReadSmokeCoAlarmInterconnectSmokeAlarm() + : ReadAttribute("interconnect-smoke-alarm") { } - ~ReadDishwasherModeEventList() + ~ReadSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode EventList read Error", error); + LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63220,25 +63135,25 @@ class ReadDishwasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + : SubscribeAttribute("interconnect-smoke-alarm") { } - ~SubscribeAttributeDishwasherModeEventList() + ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63249,10 +63164,10 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63269,34 +63184,34 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute InterconnectCOAlarm */ -class ReadDishwasherModeAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { public: - ReadDishwasherModeAttributeList() - : ReadAttribute("attribute-list") + ReadSmokeCoAlarmInterconnectCOAlarm() + : ReadAttribute("interconnect-coalarm") { } - ~ReadDishwasherModeAttributeList() + ~ReadSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AttributeList read Error", error); + LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63305,25 +63220,25 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + : SubscribeAttribute("interconnect-coalarm") { } - ~SubscribeAttributeDishwasherModeAttributeList() + ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63334,10 +63249,10 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeInterconnectCOAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63354,34 +63269,34 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute ContaminationState */ -class ReadDishwasherModeFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmContaminationState : public ReadAttribute { public: - ReadDishwasherModeFeatureMap() - : ReadAttribute("feature-map") + ReadSmokeCoAlarmContaminationState() + : ReadAttribute("contamination-state") { } - ~ReadDishwasherModeFeatureMap() + ~ReadSmokeCoAlarmContaminationState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode FeatureMap read Error", error); + LogNSError("SmokeCOAlarm ContaminationState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63390,25 +63305,25 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeSmokeCoAlarmContaminationState() + : SubscribeAttribute("contamination-state") { } - ~SubscribeAttributeDishwasherModeFeatureMap() + ~SubscribeAttributeSmokeCoAlarmContaminationState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63419,10 +63334,10 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeContaminationStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63439,34 +63354,34 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute SmokeSensitivityLevel */ -class ReadDishwasherModeClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { public: - ReadDishwasherModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadSmokeCoAlarmSmokeSensitivityLevel() + : ReadAttribute("smoke-sensitivity-level") { } - ~ReadDishwasherModeClusterRevision() + ~ReadSmokeCoAlarmSmokeSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63475,25 +63390,66 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { +class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { public: - SubscribeAttributeDishwasherModeClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteSmokeCoAlarmSmokeSensitivityLevel() + : WriteAttribute("smoke-sensitivity-level") { + AddArgument("attr-name", "smoke-sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDishwasherModeClusterRevision() + ~WriteSmokeCoAlarmSmokeSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + : SubscribeAttribute("smoke-sensitivity-level") + { + } + + ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63504,10 +63460,10 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63521,56 +63477,37 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AirQuality | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute AirQuality + * Attribute ExpiryDate */ -class ReadAirQualityAirQuality : public ReadAttribute { +class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { public: - ReadAirQualityAirQuality() - : ReadAttribute("air-quality") + ReadSmokeCoAlarmExpiryDate() + : ReadAttribute("expiry-date") { } - ~ReadAirQualityAirQuality() + ~ReadSmokeCoAlarmExpiryDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AirQuality read Error", error); + LogNSError("SmokeCOAlarm ExpiryDate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63579,25 +63516,25 @@ class ReadAirQualityAirQuality : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAirQuality() - : SubscribeAttribute("air-quality") + SubscribeAttributeSmokeCoAlarmExpiryDate() + : SubscribeAttribute("expiry-date") { } - ~SubscribeAttributeAirQualityAirQuality() + ~SubscribeAttributeSmokeCoAlarmExpiryDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63608,10 +63545,10 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAirQualityWithParams:params + [cluster subscribeAttributeExpiryDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63630,32 +63567,32 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadAirQualityGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { public: - ReadAirQualityGeneratedCommandList() + ReadSmokeCoAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAirQualityGeneratedCommandList() + ~ReadSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63664,25 +63601,25 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityGeneratedCommandList() + SubscribeAttributeSmokeCoAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAirQualityGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63696,7 +63633,7 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63715,32 +63652,32 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadAirQualityAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { public: - ReadAirQualityAcceptedCommandList() + ReadSmokeCoAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAirQualityAcceptedCommandList() + ~ReadSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63749,25 +63686,25 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAcceptedCommandList() + SubscribeAttributeSmokeCoAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAirQualityAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63781,7 +63718,7 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63800,32 +63737,32 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadAirQualityEventList : public ReadAttribute { +class ReadSmokeCoAlarmEventList : public ReadAttribute { public: - ReadAirQualityEventList() + ReadSmokeCoAlarmEventList() : ReadAttribute("event-list") { } - ~ReadAirQualityEventList() + ~ReadSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality EventList read Error", error); + LogNSError("SmokeCOAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63834,25 +63771,25 @@ class ReadAirQualityEventList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityEventList() + SubscribeAttributeSmokeCoAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAirQualityEventList() + ~SubscribeAttributeSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63866,7 +63803,7 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63885,32 +63822,32 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadAirQualityAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmAttributeList : public ReadAttribute { public: - ReadAirQualityAttributeList() + ReadSmokeCoAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAirQualityAttributeList() + ~ReadSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AttributeList read Error", error); + LogNSError("SmokeCOAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63919,25 +63856,25 @@ class ReadAirQualityAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAttributeList() + SubscribeAttributeSmokeCoAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAirQualityAttributeList() + ~SubscribeAttributeSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63951,7 +63888,7 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63970,32 +63907,32 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadAirQualityFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { public: - ReadAirQualityFeatureMap() + ReadSmokeCoAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAirQualityFeatureMap() + ~ReadSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality FeatureMap read Error", error); + LogNSError("SmokeCOAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64004,25 +63941,25 @@ class ReadAirQualityFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAirQualityFeatureMap() + SubscribeAttributeSmokeCoAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAirQualityFeatureMap() + ~SubscribeAttributeSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64036,7 +63973,7 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64055,32 +63992,32 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadAirQualityClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { public: - ReadAirQualityClusterRevision() + ReadSmokeCoAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAirQualityClusterRevision() + ~ReadSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64089,25 +64026,25 @@ class ReadAirQualityClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAirQualityClusterRevision() + SubscribeAttributeSmokeCoAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAirQualityClusterRevision() + ~SubscribeAttributeSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64121,7 +64058,7 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64138,25 +64075,17 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | +| Cluster DishwasherAlarm | 0x005D | |------------------------------------------------------------------------------| | Commands: | | -| * SelfTestRequest | 0x00 | +| * Reset | 0x00 | +| * ModifyEnabledAlarms | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SmokeSensitivityLevel | 0x000B | -| * ExpiryDate | 0x000C | +| * Mask | 0x0000 | +| * Latch | 0x0001 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -64165,182 +64094,147 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command SelfTestRequest + * Command Reset */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand { +class DishwasherAlarmReset : public ClusterCommand { public: - SmokeCoAlarmSelfTestRequest() - : ClusterCommand("self-test-request") + DishwasherAlarmReset() + : ClusterCommand("reset") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selfTestRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL - /* - * Attribute ExpressedState + * Command ModifyEnabledAlarms */ -class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { public: - ReadSmokeCoAlarmExpressedState() - : ReadAttribute("expressed-state") - { - } - - ~ReadSmokeCoAlarmExpressedState() + DishwasherAlarmModifyEnabledAlarms() + : ClusterCommand("modify-enabled-alarms") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("SmokeCOAlarm ExpressedState read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { -public: - SubscribeAttributeSmokeCoAlarmExpressedState() - : SubscribeAttribute("expressed-state") - { - } - - ~SubscribeAttributeSmokeCoAlarmExpressedState() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster modifyEnabledAlarmsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeExpressedStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeState + * Attribute Mask */ -class ReadSmokeCoAlarmSmokeState : public ReadAttribute { +class ReadDishwasherAlarmMask : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeState() - : ReadAttribute("smoke-state") + ReadDishwasherAlarmMask() + : ReadAttribute("mask") { } - ~ReadSmokeCoAlarmSmokeState() + ~ReadDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm SmokeState read Error", error); + LogNSError("DishwasherAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64349,25 +64243,25 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeState() - : SubscribeAttribute("smoke-state") + SubscribeAttributeDishwasherAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeSmokeCoAlarmSmokeState() + ~SubscribeAttributeDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64378,10 +64272,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeStateWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64398,34 +64292,34 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute COState + * Attribute Latch */ -class ReadSmokeCoAlarmCOState : public ReadAttribute { +class ReadDishwasherAlarmLatch : public ReadAttribute { public: - ReadSmokeCoAlarmCOState() - : ReadAttribute("costate") + ReadDishwasherAlarmLatch() + : ReadAttribute("latch") { } - ~ReadSmokeCoAlarmCOState() + ~ReadDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm COState read Error", error); + LogNSError("DishwasherAlarm Latch read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64434,25 +64328,25 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmCOState() - : SubscribeAttribute("costate") + SubscribeAttributeDishwasherAlarmLatch() + : SubscribeAttribute("latch") { } - ~SubscribeAttributeSmokeCoAlarmCOState() + ~SubscribeAttributeDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64463,10 +64357,10 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCOStateWithParams:params + [cluster subscribeAttributeLatchWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64483,34 +64377,34 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute BatteryAlert + * Attribute State */ -class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +class ReadDishwasherAlarmState : public ReadAttribute { public: - ReadSmokeCoAlarmBatteryAlert() - : ReadAttribute("battery-alert") + ReadDishwasherAlarmState() + : ReadAttribute("state") { } - ~ReadSmokeCoAlarmBatteryAlert() + ~ReadDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + LogNSError("DishwasherAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64519,25 +64413,25 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmBatteryAlert() - : SubscribeAttribute("battery-alert") + SubscribeAttributeDishwasherAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeSmokeCoAlarmBatteryAlert() + ~SubscribeAttributeDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64548,10 +64442,10 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryAlertWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64568,34 +64462,34 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute DeviceMuted + * Attribute Supported */ -class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { +class ReadDishwasherAlarmSupported : public ReadAttribute { public: - ReadSmokeCoAlarmDeviceMuted() - : ReadAttribute("device-muted") + ReadDishwasherAlarmSupported() + : ReadAttribute("supported") { } - ~ReadSmokeCoAlarmDeviceMuted() + ~ReadDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + LogNSError("DishwasherAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64604,25 +64498,25 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmDeviceMuted() - : SubscribeAttribute("device-muted") + SubscribeAttributeDishwasherAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeSmokeCoAlarmDeviceMuted() + ~SubscribeAttributeDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64633,10 +64527,10 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceMutedWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64653,34 +64547,34 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TestInProgress + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmTestInProgress() - : ReadAttribute("test-in-progress") + ReadDishwasherAlarmGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmTestInProgress() + ~ReadDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm TestInProgress read Error", error); + LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64689,25 +64583,25 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmTestInProgress() - : SubscribeAttribute("test-in-progress") + SubscribeAttributeDishwasherAlarmGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmTestInProgress() + ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64718,10 +64612,10 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestInProgressWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64738,34 +64632,34 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute HardwareFaultAlert + * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { +class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmHardwareFaultAlert() - : ReadAttribute("hardware-fault-alert") + ReadDishwasherAlarmAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmHardwareFaultAlert() + ~ReadDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64774,25 +64668,25 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() - : SubscribeAttribute("hardware-fault-alert") + SubscribeAttributeDishwasherAlarmAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64803,10 +64697,10 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareFaultAlertWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64823,34 +64717,34 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute EndOfServiceAlert + * Attribute EventList */ -class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { +class ReadDishwasherAlarmEventList : public ReadAttribute { public: - ReadSmokeCoAlarmEndOfServiceAlert() - : ReadAttribute("end-of-service-alert") + ReadDishwasherAlarmEventList() + : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmEndOfServiceAlert() + ~ReadDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + LogNSError("DishwasherAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64859,25 +64753,25 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() - : SubscribeAttribute("end-of-service-alert") + SubscribeAttributeDishwasherAlarmEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + ~SubscribeAttributeDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64888,10 +64782,10 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndOfServiceAlertWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64908,34 +64802,34 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectSmokeAlarm + * Attribute AttributeList */ -class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { +class ReadDishwasherAlarmAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectSmokeAlarm() - : ReadAttribute("interconnect-smoke-alarm") + ReadDishwasherAlarmAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmInterconnectSmokeAlarm() + ~ReadDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + LogNSError("DishwasherAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64944,25 +64838,25 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() - : SubscribeAttribute("interconnect-smoke-alarm") + SubscribeAttributeDishwasherAlarmAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + ~SubscribeAttributeDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64973,10 +64867,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64993,34 +64887,34 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectCOAlarm + * Attribute FeatureMap */ -class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { +class ReadDishwasherAlarmFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectCOAlarm() - : ReadAttribute("interconnect-coalarm") + ReadDishwasherAlarmFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmInterconnectCOAlarm() + ~ReadDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + LogNSError("DishwasherAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65029,25 +64923,25 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() - : SubscribeAttribute("interconnect-coalarm") + SubscribeAttributeDishwasherAlarmFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + ~SubscribeAttributeDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65058,10 +64952,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65078,34 +64972,34 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ContaminationState + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmContaminationState : public ReadAttribute { +class ReadDishwasherAlarmClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmContaminationState() - : ReadAttribute("contamination-state") + ReadDishwasherAlarmClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmContaminationState() + ~ReadDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ContaminationState read Error", error); + LogNSError("DishwasherAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65114,25 +65008,25 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmContaminationState() - : SubscribeAttribute("contamination-state") + SubscribeAttributeDishwasherAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmContaminationState() + ~SubscribeAttributeDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65143,10 +65037,10 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeContaminationStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65160,105 +65054,84 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenMode | 0x005E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeSensitivityLevel + * Attribute SupportedModes */ -class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { +class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeSensitivityLevel() - : ReadAttribute("smoke-sensitivity-level") + ReadMicrowaveOvenModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadSmokeCoAlarmSmokeSensitivityLevel() + ~ReadMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { -public: - WriteSmokeCoAlarmSmokeSensitivityLevel() - : WriteAttribute("smoke-sensitivity-level") - { - AddArgument("attr-name", "smoke-sensitivity-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteSmokeCoAlarmSmokeSensitivityLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MicrowaveOvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() - : SubscribeAttribute("smoke-sensitivity-level") + SubscribeAttributeMicrowaveOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + ~SubscribeAttributeMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65269,10 +65142,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65289,34 +65162,34 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute ExpiryDate + * Attribute CurrentMode */ -class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { public: - ReadSmokeCoAlarmExpiryDate() - : ReadAttribute("expiry-date") + ReadMicrowaveOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadSmokeCoAlarmExpiryDate() + ~ReadMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + LogNSError("MicrowaveOvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65325,25 +65198,25 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpiryDate() - : SubscribeAttribute("expiry-date") + SubscribeAttributeMicrowaveOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeSmokeCoAlarmExpiryDate() + ~SubscribeAttributeMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65354,10 +65227,10 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiryDateWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65376,32 +65249,32 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmGeneratedCommandList() + ReadMicrowaveOvenModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmGeneratedCommandList() + ~ReadMicrowaveOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65410,25 +65283,25 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65442,7 +65315,7 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65461,32 +65334,32 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri /* * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmAcceptedCommandList() + ReadMicrowaveOvenModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmAcceptedCommandList() + ~ReadMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65495,25 +65368,25 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65527,7 +65400,7 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65546,32 +65419,32 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib /* * Attribute EventList */ -class ReadSmokeCoAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenModeEventList : public ReadAttribute { public: - ReadSmokeCoAlarmEventList() + ReadMicrowaveOvenModeEventList() : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmEventList() + ~ReadMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EventList read Error", error); + LogNSError("MicrowaveOvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65580,25 +65453,25 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEventList() + SubscribeAttributeMicrowaveOvenModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmEventList() + ~SubscribeAttributeMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65612,7 +65485,7 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65631,32 +65504,32 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadSmokeCoAlarmAttributeList : public ReadAttribute { +class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmAttributeList() + ReadMicrowaveOvenModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmAttributeList() + ~ReadMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AttributeList read Error", error); + LogNSError("MicrowaveOvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65665,25 +65538,25 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAttributeList() + SubscribeAttributeMicrowaveOvenModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmAttributeList() + ~SubscribeAttributeMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65697,7 +65570,7 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65716,32 +65589,32 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmFeatureMap() + ReadMicrowaveOvenModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmFeatureMap() + ~ReadMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm FeatureMap read Error", error); + LogNSError("MicrowaveOvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65750,25 +65623,25 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmFeatureMap() + SubscribeAttributeMicrowaveOvenModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmFeatureMap() + ~SubscribeAttributeMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65782,7 +65655,7 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65801,32 +65674,32 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmClusterRevision() + ReadMicrowaveOvenModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmClusterRevision() + ~ReadMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65835,25 +65708,25 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmClusterRevision() + SubscribeAttributeMicrowaveOvenModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmClusterRevision() + ~SubscribeAttributeMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65867,7 +65740,7 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65884,17 +65757,18 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DishwasherAlarm | 0x005D | +| Cluster MicrowaveOvenControl | 0x005F | |------------------------------------------------------------------------------| | Commands: | | -| * Reset | 0x00 | -| * ModifyEnabledAlarms | 0x01 | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * Latch | 0x0001 | -| * State | 0x0002 | -| * Supported | 0x0003 | +| * CookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -65903,112 +65777,135 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command Reset + * Command SetCookingParameters */ -class DishwasherAlarmReset : public ClusterCommand { +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - DishwasherAlarmReset() - : ClusterCommand("reset") + MicrowaveOvenControlSetCookingParameters() + : ClusterCommand("set-cooking-parameters") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); + AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; + if (mRequest.cookMode.HasValue()) { + params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; + } else { + params.cookMode = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.cookTime.HasValue()) { + params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; + } else { + params.cookTime = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.powerSetting.HasValue()) { + params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; + } else { + params.powerSetting = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setCookingParametersWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command ModifyEnabledAlarms + * Command AddMoreTime */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { +class MicrowaveOvenControlAddMoreTime : public ClusterCommand { public: - DishwasherAlarmModifyEnabledAlarms() - : ClusterCommand("modify-enabled-alarms") + MicrowaveOvenControlAddMoreTime() + : ClusterCommand("add-more-time") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); + AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; + params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster modifyEnabledAlarmsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addMoreTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -66016,34 +65913,34 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute CookTime */ -class ReadDishwasherAlarmMask : public ReadAttribute { +class ReadMicrowaveOvenControlCookTime : public ReadAttribute { public: - ReadDishwasherAlarmMask() - : ReadAttribute("mask") + ReadMicrowaveOvenControlCookTime() + : ReadAttribute("cook-time") { } - ~ReadDishwasherAlarmMask() + ~ReadMicrowaveOvenControlCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Mask read Error", error); + LogNSError("MicrowaveOvenControl CookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66052,25 +65949,25 @@ class ReadDishwasherAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeMicrowaveOvenControlCookTime() + : SubscribeAttribute("cook-time") { } - ~SubscribeAttributeDishwasherAlarmMask() + ~SubscribeAttributeMicrowaveOvenControlCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66081,10 +65978,10 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66101,34 +65998,34 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Latch + * Attribute PowerSetting */ -class ReadDishwasherAlarmLatch : public ReadAttribute { +class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { public: - ReadDishwasherAlarmLatch() - : ReadAttribute("latch") + ReadMicrowaveOvenControlPowerSetting() + : ReadAttribute("power-setting") { } - ~ReadDishwasherAlarmLatch() + ~ReadMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Latch read Error", error); + LogNSError("MicrowaveOvenControl PowerSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66137,25 +66034,25 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmLatch() - : SubscribeAttribute("latch") + SubscribeAttributeMicrowaveOvenControlPowerSetting() + : SubscribeAttribute("power-setting") { } - ~SubscribeAttributeDishwasherAlarmLatch() + ~SubscribeAttributeMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66166,10 +66063,10 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLatchWithParams:params + [cluster subscribeAttributePowerSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66186,34 +66083,34 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute MinPower */ -class ReadDishwasherAlarmState : public ReadAttribute { +class ReadMicrowaveOvenControlMinPower : public ReadAttribute { public: - ReadDishwasherAlarmState() - : ReadAttribute("state") + ReadMicrowaveOvenControlMinPower() + : ReadAttribute("min-power") { } - ~ReadDishwasherAlarmState() + ~ReadMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm State read Error", error); + LogNSError("MicrowaveOvenControl MinPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66222,25 +66119,25 @@ class ReadDishwasherAlarmState : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeMicrowaveOvenControlMinPower() + : SubscribeAttribute("min-power") { } - ~SubscribeAttributeDishwasherAlarmState() + ~SubscribeAttributeMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66251,10 +66148,10 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeMinPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66271,34 +66168,34 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute MaxPower */ -class ReadDishwasherAlarmSupported : public ReadAttribute { +class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { public: - ReadDishwasherAlarmSupported() - : ReadAttribute("supported") + ReadMicrowaveOvenControlMaxPower() + : ReadAttribute("max-power") { } - ~ReadDishwasherAlarmSupported() + ~ReadMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Supported read Error", error); + LogNSError("MicrowaveOvenControl MaxPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66307,25 +66204,25 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeMicrowaveOvenControlMaxPower() + : SubscribeAttribute("max-power") { } - ~SubscribeAttributeDishwasherAlarmSupported() + ~SubscribeAttributeMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66336,10 +66233,95 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeMaxPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute PowerStep + */ +class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { +public: + ReadMicrowaveOvenControlPowerStep() + : ReadAttribute("power-step") + { + } + + ~ReadMicrowaveOvenControlPowerStep() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("MicrowaveOvenControl PowerStep read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { +public: + SubscribeAttributeMicrowaveOvenControlPowerStep() + : SubscribeAttribute("power-step") + { + } + + ~SubscribeAttributeMicrowaveOvenControlPowerStep() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePowerStepWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66358,32 +66340,32 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmGeneratedCommandList() + ReadMicrowaveOvenControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadDishwasherAlarmGeneratedCommandList() + ~ReadMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66392,25 +66374,25 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmGeneratedCommandList() + SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66424,7 +66406,7 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66443,32 +66425,32 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt /* * Attribute AcceptedCommandList */ -class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmAcceptedCommandList() + ReadMicrowaveOvenControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherAlarmAcceptedCommandList() + ~ReadMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66477,25 +66459,25 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAcceptedCommandList() + SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66509,7 +66491,7 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66528,32 +66510,32 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt /* * Attribute EventList */ -class ReadDishwasherAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenControlEventList : public ReadAttribute { public: - ReadDishwasherAlarmEventList() + ReadMicrowaveOvenControlEventList() : ReadAttribute("event-list") { } - ~ReadDishwasherAlarmEventList() + ~ReadMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm EventList read Error", error); + LogNSError("MicrowaveOvenControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66562,25 +66544,25 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmEventList() + SubscribeAttributeMicrowaveOvenControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherAlarmEventList() + ~SubscribeAttributeMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66594,7 +66576,7 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66613,32 +66595,32 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadDishwasherAlarmAttributeList : public ReadAttribute { +class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { public: - ReadDishwasherAlarmAttributeList() + ReadMicrowaveOvenControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadDishwasherAlarmAttributeList() + ~ReadMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AttributeList read Error", error); + LogNSError("MicrowaveOvenControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66647,25 +66629,25 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAttributeList() + SubscribeAttributeMicrowaveOvenControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherAlarmAttributeList() + ~SubscribeAttributeMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66679,7 +66661,7 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66698,32 +66680,32 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadDishwasherAlarmFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { public: - ReadDishwasherAlarmFeatureMap() + ReadMicrowaveOvenControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadDishwasherAlarmFeatureMap() + ~ReadMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm FeatureMap read Error", error); + LogNSError("MicrowaveOvenControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66732,25 +66714,25 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmFeatureMap() + SubscribeAttributeMicrowaveOvenControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDishwasherAlarmFeatureMap() + ~SubscribeAttributeMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66764,7 +66746,7 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66783,32 +66765,32 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadDishwasherAlarmClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { public: - ReadDishwasherAlarmClusterRevision() + ReadMicrowaveOvenControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadDishwasherAlarmClusterRevision() + ~ReadMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm ClusterRevision read Error", error); + LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66817,25 +66799,25 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmClusterRevision() + SubscribeAttributeMicrowaveOvenControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDishwasherAlarmClusterRevision() + ~SubscribeAttributeMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66849,7 +66831,7 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66864,15 +66846,22 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenMode | 0x005E | +| Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| | Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -66881,39 +66870,239 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL +/* + * Command Pause + */ +class OperationalStatePause : public ClusterCommand { +public: + OperationalStatePause() + : ClusterCommand("pause") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; /* - * Attribute SupportedModes + * Command Stop */ -class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { +class OperationalStateStop : public ClusterCommand { +public: + OperationalStateStop() + : ClusterCommand("stop") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Start + */ +class OperationalStateStart : public ClusterCommand { +public: + OperationalStateStart() + : ClusterCommand("start") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Resume + */ +class OperationalStateResume : public ClusterCommand { +public: + OperationalStateResume() + : ClusterCommand("resume") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute PhaseList + */ +class ReadOperationalStatePhaseList : public ReadAttribute { public: - ReadMicrowaveOvenModeSupportedModes() - : ReadAttribute("supported-modes") + ReadOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadMicrowaveOvenModeSupportedModes() + ~ReadOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode SupportedModes read Error", error); + LogNSError("OperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66922,25 +67111,25 @@ class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeMicrowaveOvenModeSupportedModes() + ~SubscribeAttributeOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66951,10 +67140,10 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66967,38 +67156,35 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CurrentMode + * Attribute CurrentPhase */ -class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { +class ReadOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenModeCurrentMode() - : ReadAttribute("current-mode") + ReadOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenModeCurrentMode() + ~ReadOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode CurrentMode read Error", error); + LogNSError("OperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67007,25 +67193,25 @@ class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenModeCurrentMode() + ~SubscribeAttributeOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67036,10 +67222,10 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67052,38 +67238,35 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute CountdownTime */ -class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { +class ReadOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenModeGeneratedCommandList() + ~ReadOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); + LogNSError("OperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67092,25 +67275,25 @@ class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + ~SubscribeAttributeOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67121,10 +67304,10 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67137,38 +67320,35 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute OperationalStateList */ -class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { +class ReadOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenModeAcceptedCommandList() + ~ReadOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); + LogNSError("OperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67177,25 +67357,25 @@ class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + ~SubscribeAttributeOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67206,10 +67386,10 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67222,38 +67402,35 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute OperationalState */ -class ReadMicrowaveOvenModeEventList : public ReadAttribute { +class ReadOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenModeEventList() - : ReadAttribute("event-list") + ReadOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenModeEventList() + ~ReadOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode EventList read Error", error); + LogNSError("OperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67262,25 +67439,25 @@ class ReadMicrowaveOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenModeEventList() + ~SubscribeAttributeOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67291,10 +67468,10 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67307,38 +67484,35 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute OperationalError */ -class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { +class ReadOperationalStateOperationalError : public ReadAttribute { public: - ReadMicrowaveOvenModeAttributeList() - : ReadAttribute("attribute-list") + ReadOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadMicrowaveOvenModeAttributeList() + ~ReadOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AttributeList read Error", error); + LogNSError("OperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67347,25 +67521,25 @@ class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeMicrowaveOvenModeAttributeList() + ~SubscribeAttributeOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67376,10 +67550,10 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67392,38 +67566,35 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { +class ReadOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenModeFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadMicrowaveOvenModeFeatureMap() + ~ReadOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode FeatureMap read Error", error); + LogNSError("OperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67432,25 +67603,25 @@ class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMicrowaveOvenModeFeatureMap() + ~SubscribeAttributeOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67461,10 +67632,10 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67477,38 +67648,35 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { +class ReadOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMicrowaveOvenModeClusterRevision() + ~ReadOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); + LogNSError("OperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67517,25 +67685,25 @@ class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMicrowaveOvenModeClusterRevision() + ~SubscribeAttributeOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67546,10 +67714,10 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67562,194 +67730,37 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenControl | 0x005F | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetCookingParameters | 0x00 | -| * AddMoreTime | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CookTime | 0x0001 | -| * PowerSetting | 0x0002 | -| * MinPower | 0x0003 | -| * MaxPower | 0x0004 | -| * PowerStep | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetCookingParameters - */ -class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { -public: - MicrowaveOvenControlSetCookingParameters() - : ClusterCommand("set-cooking-parameters") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookMode.HasValue()) { - params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; - } else { - params.cookMode = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookTime.HasValue()) { - params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; - } else { - params.cookTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.powerSetting.HasValue()) { - params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; - } else { - params.powerSetting = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCookingParametersWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command AddMoreTime - */ -class MicrowaveOvenControlAddMoreTime : public ClusterCommand { -public: - MicrowaveOvenControlAddMoreTime() - : ClusterCommand("add-more-time") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addMoreTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute CookTime + * Attribute EventList */ -class ReadMicrowaveOvenControlCookTime : public ReadAttribute { +class ReadOperationalStateEventList : public ReadAttribute { public: - ReadMicrowaveOvenControlCookTime() - : ReadAttribute("cook-time") + ReadOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadMicrowaveOvenControlCookTime() + ~ReadOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl CookTime read Error", error); + LogNSError("OperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67758,25 +67769,25 @@ class ReadMicrowaveOvenControlCookTime : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { +class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlCookTime() - : SubscribeAttribute("cook-time") + SubscribeAttributeOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMicrowaveOvenControlCookTime() + ~SubscribeAttributeOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67787,10 +67798,10 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCookTimeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67804,37 +67815,36 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute PowerSetting + * Attribute AttributeList */ -class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { +class ReadOperationalStateAttributeList : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerSetting() - : ReadAttribute("power-setting") + ReadOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMicrowaveOvenControlPowerSetting() + ~ReadOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl PowerSetting read Error", error); + LogNSError("OperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67843,25 +67853,25 @@ class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerSetting() - : SubscribeAttribute("power-setting") + SubscribeAttributeOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMicrowaveOvenControlPowerSetting() + ~SubscribeAttributeOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67872,10 +67882,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerSettingWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67888,38 +67898,35 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MinPower + * Attribute FeatureMap */ -class ReadMicrowaveOvenControlMinPower : public ReadAttribute { +class ReadOperationalStateFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenControlMinPower() - : ReadAttribute("min-power") + ReadOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenControlMinPower() + ~ReadOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MinPower read Error", error); + LogNSError("OperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67928,25 +67935,25 @@ class ReadMicrowaveOvenControlMinPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { +class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMinPower() - : SubscribeAttribute("min-power") + SubscribeAttributeOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenControlMinPower() + ~SubscribeAttributeOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67957,10 +67964,10 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPowerWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67973,38 +67980,35 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxPower + * Attribute ClusterRevision */ -class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { +class ReadOperationalStateClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenControlMaxPower() - : ReadAttribute("max-power") + ReadOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenControlMaxPower() + ~ReadOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MaxPower read Error", error); + LogNSError("OperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68013,25 +68017,25 @@ class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { +class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMaxPower() - : SubscribeAttribute("max-power") + SubscribeAttributeOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenControlMaxPower() + ~SubscribeAttributeOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68042,10 +68046,10 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPowerWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68058,208 +68062,267 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RvcOperationalState | 0x0061 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ /* - * Attribute PowerStep + * Command Pause */ -class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { +class RvcOperationalStatePause : public ClusterCommand { public: - ReadMicrowaveOvenControlPowerStep() - : ReadAttribute("power-step") - { - } - - ~ReadMicrowaveOvenControlPowerStep() + RvcOperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("MicrowaveOvenControl PowerStep read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class RvcOperationalStateStop : public ClusterCommand { public: - SubscribeAttributeMicrowaveOvenControlPowerStep() - : SubscribeAttribute("power-step") - { - } - - ~SubscribeAttributeMicrowaveOvenControlPowerStep() + RvcOperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributePowerStepWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Command Start */ -class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { +class RvcOperationalStateStart : public ClusterCommand { public: - ReadMicrowaveOvenControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadMicrowaveOvenControlGeneratedCommandList() + RvcOperationalStateStart() + : ClusterCommand("start") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class RvcOperationalStateResume : public ClusterCommand { public: - SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + RvcOperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: +}; /* - * Attribute AcceptedCommandList + * Attribute PhaseList */ -class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { +class ReadRvcOperationalStatePhaseList : public ReadAttribute { public: - ReadMicrowaveOvenControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRvcOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadMicrowaveOvenControlAcceptedCommandList() + ~ReadRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); + LogNSError("RVCOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68268,25 +68331,25 @@ class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRvcOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + ~SubscribeAttributeRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68297,10 +68360,10 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68313,38 +68376,35 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CurrentPhase */ -class ReadMicrowaveOvenControlEventList : public ReadAttribute { +class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenControlEventList() - : ReadAttribute("event-list") + ReadRvcOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenControlEventList() + ~ReadRvcOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl EventList read Error", error); + LogNSError("RVCOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68353,25 +68413,25 @@ class ReadMicrowaveOvenControlEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRvcOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenControlEventList() + ~SubscribeAttributeRvcOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68382,10 +68442,10 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68398,38 +68458,35 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute CountdownTime */ -class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { +class ReadRvcOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenControlAttributeList() - : ReadAttribute("attribute-list") + ReadRvcOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenControlAttributeList() + ~ReadRvcOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AttributeList read Error", error); + LogNSError("RVCOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68438,25 +68495,25 @@ class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRvcOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenControlAttributeList() + ~SubscribeAttributeRvcOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68467,10 +68524,10 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68483,38 +68540,35 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute OperationalStateList */ -class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { +class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenControlFeatureMap() - : ReadAttribute("feature-map") + ReadRvcOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenControlFeatureMap() + ~ReadRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl FeatureMap read Error", error); + LogNSError("RVCOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68523,25 +68577,25 @@ class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRvcOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenControlFeatureMap() + ~SubscribeAttributeRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68552,10 +68606,10 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68568,38 +68622,35 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute OperationalState */ -class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { +class ReadRvcOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadRvcOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenControlClusterRevision() + ~ReadRvcOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); + LogNSError("RVCOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68608,25 +68659,25 @@ class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRvcOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenControlClusterRevision() + ~SubscribeAttributeRvcOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68637,10 +68688,10 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68653,265 +68704,117 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command Pause + * Attribute OperationalError */ -class OperationalStatePause : public ClusterCommand { +class ReadRvcOperationalStateOperationalError : public ReadAttribute { public: - OperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadRvcOperationalStateOperationalError() + : ReadAttribute("operational-error") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command Stop - */ -class OperationalStateStop : public ClusterCommand { -public: - OperationalStateStop() - : ClusterCommand("stop") + ~ReadRvcOperationalStateOperationalError() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command Start - */ -class OperationalStateStart : public ClusterCommand { +class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { public: - OperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeRvcOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command Resume - */ -class OperationalStateResume : public ClusterCommand { -public: - OperationalStateResume() - : ClusterCommand("resume") + ~SubscribeAttributeRvcOperationalStateOperationalError() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOperationalErrorWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Attribute PhaseList + * Attribute GeneratedCommandList */ -class ReadOperationalStatePhaseList : public ReadAttribute { +class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadRvcOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalStatePhaseList() + ~ReadRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState PhaseList read Error", error); + LogNSError("RVCOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68920,25 +68823,25 @@ class ReadOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeRvcOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalStatePhaseList() + ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68949,10 +68852,10 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68966,34 +68869,34 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { }; /* - * Attribute CurrentPhase + * Attribute AcceptedCommandList */ -class ReadOperationalStateCurrentPhase : public ReadAttribute { +class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadRvcOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalStateCurrentPhase() + ~ReadRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CurrentPhase read Error", error); + LogNSError("RVCOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69002,25 +68905,25 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeRvcOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalStateCurrentPhase() + ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69031,10 +68934,10 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69047,35 +68950,37 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CountdownTime + * Attribute EventList */ -class ReadOperationalStateCountdownTime : public ReadAttribute { +class ReadRvcOperationalStateEventList : public ReadAttribute { public: - ReadOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadRvcOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalStateCountdownTime() + ~ReadRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CountdownTime read Error", error); + LogNSError("RVCOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69084,25 +68989,25 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeRvcOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalStateCountdownTime() + ~SubscribeAttributeRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69113,10 +69018,10 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69129,35 +69034,37 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalStateList + * Attribute AttributeList */ -class ReadOperationalStateOperationalStateList : public ReadAttribute { +class ReadRvcOperationalStateAttributeList : public ReadAttribute { public: - ReadOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadRvcOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalStateOperationalStateList() + ~ReadRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalStateList read Error", error); + LogNSError("RVCOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69166,25 +69073,25 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeRvcOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalStateOperationalStateList() + ~SubscribeAttributeRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69195,10 +69102,10 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69212,34 +69119,34 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA }; /* - * Attribute OperationalState + * Attribute FeatureMap */ -class ReadOperationalStateOperationalState : public ReadAttribute { +class ReadRvcOperationalStateFeatureMap : public ReadAttribute { public: - ReadOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadRvcOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalStateOperationalState() + ~ReadRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalState read Error", error); + LogNSError("RVCOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69248,25 +69155,25 @@ class ReadOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeRvcOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalStateOperationalState() + ~SubscribeAttributeRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69277,10 +69184,10 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69294,34 +69201,34 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri }; /* - * Attribute OperationalError + * Attribute ClusterRevision */ -class ReadOperationalStateOperationalError : public ReadAttribute { +class ReadRvcOperationalStateClusterRevision : public ReadAttribute { public: - ReadOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadRvcOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalStateOperationalError() + ~ReadRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalError read Error", error); + LogNSError("RVCOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69330,25 +69237,25 @@ class ReadOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeRvcOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalStateOperationalError() + ~SubscribeAttributeRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69359,10 +69266,10 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69375,367 +69282,817 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ScenesManagement | 0x0062 | +|------------------------------------------------------------------------------| +| Commands: | | +| * AddScene | 0x00 | +| * ViewScene | 0x01 | +| * RemoveScene | 0x02 | +| * RemoveAllScenes | 0x03 | +| * StoreScene | 0x04 | +| * RecallScene | 0x05 | +| * GetSceneMembership | 0x06 | +| * EnhancedAddScene | 0x40 | +| * EnhancedViewScene | 0x41 | +| * CopyScene | 0x42 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SceneCount | 0x0000 | +| * CurrentScene | 0x0001 | +| * CurrentGroup | 0x0002 | +| * SceneValid | 0x0003 | +| * NameSupport | 0x0004 | +| * LastConfiguredBy | 0x0005 | +| * SceneTableSize | 0x0006 | +| * FabricSceneInfo | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Command AddScene */ -class ReadOperationalStateGeneratedCommandList : public ReadAttribute { +class ScenesManagementAddScene : public ClusterCommand { public: - ReadOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOperationalStateGeneratedCommandList() + ScenesManagementAddScene() + : ClusterCommand("add-scene") + , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneName", &mRequest.sceneName); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::AddScene::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OperationalState GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.extensionFieldSets) { + MTRScenesManagementClusterExtensionFieldSet * newElement_0; + newElement_0 = [MTRScenesManagementClusterExtensionFieldSet new]; + newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.attributeValueList) { + MTRScenesManagementClusterAttributeValuePair * newElement_2; + newElement_2 = [MTRScenesManagementClusterAttributeValuePair new]; + newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; + newElement_2.attributeValue = [NSNumber numberWithUnsignedInt:entry_2.attributeValue]; + [array_2 addObject:newElement_2]; + } + newElement_0.attributeValueList = array_2; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; + params.extensionFieldSets = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addSceneWithParams:params completion: + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::AddScene::Type mRequest; + TypedComplexArgument> mComplex_ExtensionFieldSets; }; -class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ViewScene + */ +class ScenesManagementViewScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeOperationalStateGeneratedCommandList() + ScenesManagementViewScene() + : ClusterCommand("view-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::ViewScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster viewSceneWithParams:params completion: + ^(MTRScenesManagementClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Command RemoveScene */ -class ReadOperationalStateAcceptedCommandList : public ReadAttribute { +class ScenesManagementRemoveScene : public ClusterCommand { public: - ReadOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ScenesManagementRemoveScene() + : ClusterCommand("remove-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadOperationalStateAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeSceneWithParams:params completion: + ^(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveAllScenes + */ +class ScenesManagementRemoveAllScenes : public ClusterCommand { +public: + ScenesManagementRemoveAllScenes() + : ClusterCommand("remove-all-scenes") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OperationalState AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeAllScenesWithParams:params completion: + ^(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type mRequest; }; -class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StoreScene + */ +class ScenesManagementStoreScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + ScenesManagementStoreScene() + : ClusterCommand("store-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOperationalStateAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::StoreScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster storeSceneWithParams:params completion: + ^(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RecallScene + */ +class ScenesManagementRecallScene : public ClusterCommand { +public: + ScenesManagementRecallScene() + : ClusterCommand("recall-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RecallScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.transitionTime.HasValue()) { + if (mRequest.transitionTime.Value().IsNull()) { + params.transitionTime = nil; + } else { + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime.Value().Value()]; + } + } else { + params.transitionTime = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster recallSceneWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Command GetSceneMembership */ -class ReadOperationalStateEventList : public ReadAttribute { +class ScenesManagementGetSceneMembership : public ClusterCommand { public: - ReadOperationalStateEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOperationalStateEventList() + ScenesManagementGetSceneMembership() + : ClusterCommand("get-scene-membership") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OperationalState EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type mRequest; }; -class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command EnhancedAddScene + */ +class ScenesManagementEnhancedAddScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOperationalStateEventList() + ScenesManagementEnhancedAddScene() + : ClusterCommand("enhanced-add-scene") + , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneName", &mRequest.sceneName); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterEnhancedAddSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.extensionFieldSets) { + MTRScenesManagementClusterExtensionFieldSet * newElement_0; + newElement_0 = [MTRScenesManagementClusterExtensionFieldSet new]; + newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.attributeValueList) { + MTRScenesManagementClusterAttributeValuePair * newElement_2; + newElement_2 = [MTRScenesManagementClusterAttributeValuePair new]; + newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; + newElement_2.attributeValue = [NSNumber numberWithUnsignedInt:entry_2.attributeValue]; + [array_2 addObject:newElement_2]; + } + newElement_0.attributeValueList = array_2; + } + [array_0 addObject:newElement_0]; + } + params.extensionFieldSets = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedAddSceneWithParams:params completion: + ^(MTRScenesManagementClusterEnhancedAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Type mRequest; + TypedComplexArgument> mComplex_ExtensionFieldSets; }; #endif // MTR_ENABLE_PROVISIONAL - +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Command EnhancedViewScene */ -class ReadOperationalStateAttributeList : public ReadAttribute { +class ScenesManagementEnhancedViewScene : public ClusterCommand { public: - ReadOperationalStateAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadOperationalStateAttributeList() + ScenesManagementEnhancedViewScene() + : ClusterCommand("enhanced-view-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OperationalState AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedViewSceneWithParams:params completion: + ^(MTRScenesManagementClusterEnhancedViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::EnhancedViewScene::Type mRequest; }; -class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CopyScene + */ +class ScenesManagementCopyScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeOperationalStateAttributeList() + ScenesManagementCopyScene() + : ClusterCommand("copy-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::CopyScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterCopySceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.mode = [NSNumber numberWithUnsignedChar:mRequest.mode.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierFrom]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierFrom]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifierTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierTo]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneIdentifierTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierTo]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster copySceneWithParams:params completion: + ^(MTRScenesManagementClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute SceneCount */ -class ReadOperationalStateFeatureMap : public ReadAttribute { +class ReadScenesManagementSceneCount : public ReadAttribute { public: - ReadOperationalStateFeatureMap() - : ReadAttribute("feature-map") + ReadScenesManagementSceneCount() + : ReadAttribute("scene-count") { } - ~ReadOperationalStateFeatureMap() + ~ReadScenesManagementSceneCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.SceneCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState FeatureMap read Error", error); + LogNSError("ScenesManagement SceneCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69744,25 +70101,25 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeScenesManagementSceneCount : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeScenesManagementSceneCount() + : SubscribeAttribute("scene-count") { } - ~SubscribeAttributeOperationalStateFeatureMap() + ~SubscribeAttributeScenesManagementSceneCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69773,10 +70130,10 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSceneCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + NSLog(@"ScenesManagement.SceneCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69789,35 +70146,38 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute CurrentScene */ -class ReadOperationalStateClusterRevision : public ReadAttribute { +class ReadScenesManagementCurrentScene : public ReadAttribute { public: - ReadOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadScenesManagementCurrentScene() + : ReadAttribute("current-scene") { } - ~ReadOperationalStateClusterRevision() + ~ReadScenesManagementCurrentScene() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::CurrentScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.CurrentScene response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState ClusterRevision read Error", error); + LogNSError("ScenesManagement CurrentScene read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69826,25 +70186,25 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeScenesManagementCurrentScene : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeScenesManagementCurrentScene() + : SubscribeAttribute("current-scene") { } - ~SubscribeAttributeOperationalStateClusterRevision() + ~SubscribeAttributeScenesManagementCurrentScene() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::CurrentScene::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69855,10 +70215,10 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentSceneWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + NSLog(@"ScenesManagement.CurrentScene response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69871,267 +70231,38 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster RvcOperationalState | 0x0061 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command Pause - */ -class RvcOperationalStatePause : public ClusterCommand { -public: - RvcOperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class RvcOperationalStateStop : public ClusterCommand { -public: - RvcOperationalStateStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Stop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class RvcOperationalStateStart : public ClusterCommand { -public: - RvcOperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -/* - * Command Resume - */ -class RvcOperationalStateResume : public ClusterCommand { -public: - RvcOperationalStateResume() - : ClusterCommand("resume") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; /* - * Attribute PhaseList + * Attribute CurrentGroup */ -class ReadRvcOperationalStatePhaseList : public ReadAttribute { +class ReadScenesManagementCurrentGroup : public ReadAttribute { public: - ReadRvcOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadScenesManagementCurrentGroup() + : ReadAttribute("current-group") { } - ~ReadRvcOperationalStatePhaseList() + ~ReadScenesManagementCurrentGroup() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::CurrentGroup::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.CurrentGroup response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState PhaseList read Error", error); + LogNSError("ScenesManagement CurrentGroup read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70140,25 +70271,25 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementCurrentGroup : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeScenesManagementCurrentGroup() + : SubscribeAttribute("current-group") { } - ~SubscribeAttributeRvcOperationalStatePhaseList() + ~SubscribeAttributeScenesManagementCurrentGroup() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::CurrentGroup::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70169,10 +70300,10 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeCurrentGroupWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.CurrentGroup response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70185,35 +70316,38 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPhase + * Attribute SceneValid */ -class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { +class ReadScenesManagementSceneValid : public ReadAttribute { public: - ReadRvcOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadScenesManagementSceneValid() + : ReadAttribute("scene-valid") { } - ~ReadRvcOperationalStateCurrentPhase() + ~ReadScenesManagementSceneValid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneValid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.SceneValid response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CurrentPhase read Error", error); + LogNSError("ScenesManagement SceneValid read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70222,25 +70356,25 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeScenesManagementSceneValid : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeScenesManagementSceneValid() + : SubscribeAttribute("scene-valid") { } - ~SubscribeAttributeRvcOperationalStateCurrentPhase() + ~SubscribeAttributeScenesManagementSceneValid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneValid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70251,10 +70385,10 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeSceneValidWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"ScenesManagement.SceneValid response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70267,35 +70401,38 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CountdownTime + * Attribute NameSupport */ -class ReadRvcOperationalStateCountdownTime : public ReadAttribute { +class ReadScenesManagementNameSupport : public ReadAttribute { public: - ReadRvcOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadScenesManagementNameSupport() + : ReadAttribute("name-support") { } - ~ReadRvcOperationalStateCountdownTime() + ~ReadScenesManagementNameSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::NameSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.NameSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CountdownTime read Error", error); + LogNSError("ScenesManagement NameSupport read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70304,25 +70441,25 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeScenesManagementNameSupport : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeScenesManagementNameSupport() + : SubscribeAttribute("name-support") { } - ~SubscribeAttributeRvcOperationalStateCountdownTime() + ~SubscribeAttributeScenesManagementNameSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::NameSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70333,10 +70470,10 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeNameSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + NSLog(@"ScenesManagement.NameSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70349,35 +70486,38 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalStateList + * Attribute LastConfiguredBy */ -class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { +class ReadScenesManagementLastConfiguredBy : public ReadAttribute { public: - ReadRvcOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadScenesManagementLastConfiguredBy() + : ReadAttribute("last-configured-by") { } - ~ReadRvcOperationalStateOperationalStateList() + ~ReadScenesManagementLastConfiguredBy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalStateList read Error", error); + LogNSError("ScenesManagement LastConfiguredBy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70386,25 +70526,25 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementLastConfiguredBy : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeScenesManagementLastConfiguredBy() + : SubscribeAttribute("last-configured-by") { } - ~SubscribeAttributeRvcOperationalStateOperationalStateList() + ~SubscribeAttributeScenesManagementLastConfiguredBy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70415,10 +70555,10 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeLastConfiguredByWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70431,35 +70571,38 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalState + * Attribute SceneTableSize */ -class ReadRvcOperationalStateOperationalState : public ReadAttribute { +class ReadScenesManagementSceneTableSize : public ReadAttribute { public: - ReadRvcOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadScenesManagementSceneTableSize() + : ReadAttribute("scene-table-size") { } - ~ReadRvcOperationalStateOperationalState() + ~ReadScenesManagementSceneTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalState read Error", error); + LogNSError("ScenesManagement SceneTableSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70468,25 +70611,25 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeScenesManagementSceneTableSize : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeScenesManagementSceneTableSize() + : SubscribeAttribute("scene-table-size") { } - ~SubscribeAttributeRvcOperationalStateOperationalState() + ~SubscribeAttributeScenesManagementSceneTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70497,10 +70640,10 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeSceneTableSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70513,35 +70656,42 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalError + * Attribute FabricSceneInfo */ -class ReadRvcOperationalStateOperationalError : public ReadAttribute { +class ReadScenesManagementFabricSceneInfo : public ReadAttribute { public: - ReadRvcOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadScenesManagementFabricSceneInfo() + : ReadAttribute("fabric-scene-info") { } - ~ReadRvcOperationalStateOperationalError() + ~ReadScenesManagementFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalError read Error", error); + LogNSError("ScenesManagement FabricSceneInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70550,25 +70700,25 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeScenesManagementFabricSceneInfo : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeScenesManagementFabricSceneInfo() + : SubscribeAttribute("fabric-scene-info") { } - ~SubscribeAttributeRvcOperationalStateOperationalError() + ~SubscribeAttributeScenesManagementFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70579,10 +70729,10 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeFabricSceneInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70595,35 +70745,38 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadScenesManagementGeneratedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateGeneratedCommandList() + ReadScenesManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcOperationalStateGeneratedCommandList() + ~ReadScenesManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState GeneratedCommandList read Error", error); + LogNSError("ScenesManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70632,25 +70785,25 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateGeneratedCommandList() + SubscribeAttributeScenesManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() + ~SubscribeAttributeScenesManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70664,7 +70817,7 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70677,35 +70830,38 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadScenesManagementAcceptedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateAcceptedCommandList() + ReadScenesManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcOperationalStateAcceptedCommandList() + ~ReadScenesManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AcceptedCommandList read Error", error); + LogNSError("ScenesManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70714,25 +70870,25 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAcceptedCommandList() + SubscribeAttributeScenesManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() + ~SubscribeAttributeScenesManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70746,7 +70902,7 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70759,37 +70915,38 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcOperationalStateEventList : public ReadAttribute { +class ReadScenesManagementEventList : public ReadAttribute { public: - ReadRvcOperationalStateEventList() + ReadScenesManagementEventList() : ReadAttribute("event-list") { } - ~ReadRvcOperationalStateEventList() + ~ReadScenesManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + NSLog(@"ScenesManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState EventList read Error", error); + LogNSError("ScenesManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70798,25 +70955,25 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateEventList() + SubscribeAttributeScenesManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcOperationalStateEventList() + ~SubscribeAttributeScenesManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70830,7 +70987,7 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + NSLog(@"ScenesManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70844,36 +71001,37 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcOperationalStateAttributeList : public ReadAttribute { +class ReadScenesManagementAttributeList : public ReadAttribute { public: - ReadRvcOperationalStateAttributeList() + ReadScenesManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcOperationalStateAttributeList() + ~ReadScenesManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + NSLog(@"ScenesManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AttributeList read Error", error); + LogNSError("ScenesManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70882,25 +71040,25 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAttributeList() + SubscribeAttributeScenesManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcOperationalStateAttributeList() + ~SubscribeAttributeScenesManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70914,7 +71072,7 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + NSLog(@"ScenesManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70927,35 +71085,38 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcOperationalStateFeatureMap : public ReadAttribute { +class ReadScenesManagementFeatureMap : public ReadAttribute { public: - ReadRvcOperationalStateFeatureMap() + ReadScenesManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcOperationalStateFeatureMap() + ~ReadScenesManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState FeatureMap read Error", error); + LogNSError("ScenesManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70964,25 +71125,25 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeScenesManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateFeatureMap() + SubscribeAttributeScenesManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcOperationalStateFeatureMap() + ~SubscribeAttributeScenesManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70996,7 +71157,7 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71009,35 +71170,38 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcOperationalStateClusterRevision : public ReadAttribute { +class ReadScenesManagementClusterRevision : public ReadAttribute { public: - ReadRvcOperationalStateClusterRevision() + ReadScenesManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcOperationalStateClusterRevision() + ~ReadScenesManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState ClusterRevision read Error", error); + LogNSError("ScenesManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71046,25 +71210,25 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateClusterRevision() + SubscribeAttributeScenesManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcOperationalStateClusterRevision() + ~SubscribeAttributeScenesManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71078,7 +71242,7 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71091,6 +71255,8 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster HepaFilterMonitoring | 0x0071 | @@ -177315,65 +177481,6 @@ void registerClusterGroups(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterScenes(Commands & commands) -{ - using namespace chip::app::Clusters::Scenes; - - const char * clusterName = "Scenes"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterOnOff(Commands & commands) { using namespace chip::app::Clusters::OnOff; @@ -180364,6 +180471,109 @@ void registerClusterRvcOperationalState(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); } +void registerClusterScenesManagement(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ScenesManagement; + + const char * clusterName = "ScenesManagement"; + + commands_list clusterCommands = { + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + make_unique(Id), // + make_unique(Id), // + make_unique(Id), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} void registerClusterHepaFilterMonitoring(Commands & commands) { #if MTR_ENABLE_PROVISIONAL @@ -184546,7 +184756,6 @@ void registerClusters(Commands & commands) registerClusterAny(commands); registerClusterIdentify(commands); registerClusterGroups(commands); - registerClusterScenes(commands); registerClusterOnOff(commands); registerClusterOnOffSwitchConfiguration(commands); registerClusterLevelControl(commands); @@ -184602,6 +184811,7 @@ void registerClusters(Commands & commands) registerClusterMicrowaveOvenControl(commands); registerClusterOperationalState(commands); registerClusterRvcOperationalState(commands); + registerClusterScenesManagement(commands); registerClusterHepaFilterMonitoring(commands); registerClusterActivatedCarbonFilterMonitoring(commands); registerClusterBooleanStateConfiguration(commands); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index fcffb2ec55a525..1e5f6e0136611b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -190068,13 +190068,13 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH1 confirms its Scene table is empty and gets its capacity: Error: %@", err); } else { @@ -190107,13 +190107,13 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH2 confirms its Scene table is empty and has the same capacity as TH1: Error: %@", err); } else { @@ -190152,10 +190152,10 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; @@ -190167,7 +190167,7 @@ class TestScenesFabricRemoval : public TestCommandBridge { params.extensionFieldSets = temp_0; } [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH1 sends an AddScene command to DUT for Scene 1 G1: Error: %@", err); } else { @@ -190201,10 +190201,10 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:2U]; @@ -190216,7 +190216,7 @@ class TestScenesFabricRemoval : public TestCommandBridge { params.extensionFieldSets = temp_0; } [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH1 sends an AddScene command to DUT for Scene 2 G1: Error: %@", err); } else { @@ -190250,10 +190250,10 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; @@ -190265,7 +190265,7 @@ class TestScenesFabricRemoval : public TestCommandBridge { params.extensionFieldSets = temp_0; } [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH2 sends an AddScene command to DUT for Scene 1 G1: Error: %@", err); } else { @@ -190299,10 +190299,10 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:2U]; @@ -190314,7 +190314,7 @@ class TestScenesFabricRemoval : public TestCommandBridge { params.extensionFieldSets = temp_0; } [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH2 sends an AddScene command to DUT for Scene 2 G1: Error: %@", err); } else { @@ -190348,13 +190348,13 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH1 confirms its G1 holds 2 scenes: Error: %@", err); } else { @@ -190396,13 +190396,13 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH2 confirms its G1 holds 2 scenes: Error: %@", err); } else { @@ -190470,13 +190470,13 @@ class TestScenesFabricRemoval : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"TH1 confirms its G1 still holds 2 scenes: Error: %@", err); } else { @@ -190847,7 +190847,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190875,7 +190875,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190898,7 +190898,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190921,7 +190921,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190944,7 +190944,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190967,7 +190967,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -190990,7 +190990,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191013,7 +191013,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191036,7 +191036,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191059,7 +191059,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191089,7 +191089,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191117,7 +191117,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191142,7 +191142,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191167,7 +191167,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191192,7 +191192,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191223,7 +191223,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191248,7 +191248,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191273,7 +191273,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191298,7 +191298,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191328,7 +191328,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191353,7 +191353,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191378,7 +191378,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -191586,7 +191586,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191609,7 +191609,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191632,7 +191632,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191655,7 +191655,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191678,7 +191678,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191706,7 +191706,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191734,7 +191734,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191761,7 +191761,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -191784,7 +191784,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRReadParams alloc] init]; @@ -192307,13 +192307,13 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; [cluster removeAllScenesWithParams:params completion: - ^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"Step 2b: TH sends a RemoveAllScenes command to DUT with the GroupID field set to G1.: Error: %@", err); } else { @@ -192342,10 +192342,10 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; @@ -192357,7 +192357,7 @@ class Test_TC_S_2_4 : public TestCommandBridge { params.extensionFieldSets = temp_0; } [cluster addSceneWithParams:params completion: - ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"Step 3: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x0014 (20s) and no extension field sets.: Error: %@", err); } else { @@ -192433,15 +192433,15 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterStoreSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; [cluster storeSceneWithParams:params completion: - ^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable err) { + ^(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable err) { if (err != nil) { NSLog(@"Step 4b: TH sends a StoreScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01.: Error: %@", err); } else { @@ -192553,10 +192553,10 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; @@ -192668,10 +192668,10 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U]; @@ -192785,10 +192785,10 @@ class Test_TC_S_2_4 : public TestCommandBridge { { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; + __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; params.sceneID = [NSNumber numberWithUnsignedChar:1U];